Attempted to make a plugin
Cannot seem to get it working automatically yet
This commit is contained in:
parent
404a25cbb6
commit
95d3c754ee
23
index.js
Normal file
23
index.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
var mdast = require('mdast')
|
||||||
|
// var lint = require('mdast-lint')
|
||||||
|
var fs = require('graceful-fs')
|
||||||
|
var remarkTitle = require('remark-title')
|
||||||
|
var doc = '/Users/richard/src/ipfs-readme-standard/README.md'
|
||||||
|
// TODO Replace README with readme option
|
||||||
|
|
||||||
|
fs.writeFileSync(doc, mdast().use(remarkTitle, {
|
||||||
|
title: 'IPFS Readme Standard'
|
||||||
|
}).process(
|
||||||
|
fs.readFileSync(doc, 'utf8'), function (err, file, res) {
|
||||||
|
if (err) {
|
||||||
|
console.log(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file.messages[0] != null) {
|
||||||
|
console.log(file.messages)
|
||||||
|
} else {
|
||||||
|
console.log('No errors found!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user