2016-05-13 19:30:44 +00:00
|
|
|
var mdast = require('remark')
|
|
|
|
var lint = require('remark-lint')
|
2015-12-27 21:01:19 +00:00
|
|
|
var fs = require('graceful-fs')
|
|
|
|
var remarkTitle = require('remark-title')
|
2015-12-27 21:04:44 +00:00
|
|
|
var doc = './README.md'
|
2015-12-27 21:01:19 +00:00
|
|
|
// TODO Replace README with readme option
|
2016-05-13 19:30:44 +00:00
|
|
|
// TODO Log that the title has been replaced
|
2015-12-27 21:01:19 +00:00
|
|
|
|
2016-05-13 19:30:44 +00:00
|
|
|
// fs.writeFileSync(doc, mdast().use(remarkTitle, {}, lint).process(
|
|
|
|
// fs.readFileSync(doc, 'utf8'), function (err, file, res) {
|
|
|
|
// if (err) {
|
|
|
|
// console.log(err)
|
|
|
|
// return
|
|
|
|
// }
|
2015-12-27 21:01:19 +00:00
|
|
|
|
2016-05-13 19:30:44 +00:00
|
|
|
// if (file.messages[0] != null) {
|
|
|
|
// console.log(file.messages)
|
|
|
|
// } else {
|
|
|
|
// console.log('No errors found!')
|
|
|
|
// }
|
|
|
|
// })
|
|
|
|
// )
|