Added package, used lint

This commit is contained in:
Richard Littauer 2015-12-27 16:04:44 -05:00
parent 28aaf3234d
commit e51095d9ba
3 changed files with 6 additions and 6 deletions

View File

@ -6,4 +6,4 @@
![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif) ![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)
> Standardize all IPFS Readme.md's and other markdown files > Standardize all IPFS Readme.md's and other markdown files

View File

@ -1,13 +1,13 @@
var mdast = require('mdast') var mdast = require('mdast')
// var lint = require('mdast-lint') var lint = require('mdast-lint')
var fs = require('graceful-fs') var fs = require('graceful-fs')
var remarkTitle = require('remark-title') var remarkTitle = require('remark-title')
var doc = '/Users/richard/src/ipfs-readme-standard/README.md' var doc = './README.md'
// TODO Replace README with readme option // TODO Replace README with readme option
fs.writeFileSync(doc, mdast().use(remarkTitle, { fs.writeFileSync(doc, mdast().use(remarkTitle, {
title: 'IPFS Readme Standard' title: 'IPFS Readme Standard'
}).process( }, lint).process(
fs.readFileSync(doc, 'utf8'), function (err, file, res) { fs.readFileSync(doc, 'utf8'), function (err, file, res) {
if (err) { if (err) {
console.log(err) console.log(err)

View File

@ -25,10 +25,10 @@
}, },
"homepage": "https://github.com/ipfs/ipfs-readme-standard#readme", "homepage": "https://github.com/ipfs/ipfs-readme-standard#readme",
"dependencies": { "dependencies": {
"fs": "0.0.2",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"mdast": "^2.1.0", "mdast": "^2.1.0",
"mdast-lint": "^1.1.1" "mdast-lint": "^1.1.1",
"remark-title": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"babel-cli": "^6.3.17" "babel-cli": "^6.3.17"