Compare commits

...

1 Commits

Author SHA1 Message Date
Richard Littauer
4ccb64561b Lint-title stuff 2016-05-13 15:30:44 -04:00
4 changed files with 35 additions and 29 deletions

View File

@ -1,7 +1,13 @@
{
"plugins": {
"remark-title": {
"title": "IPFS Readme Standard"
}
"remark-title": {},
"lint": {
"no-multiple-toplevel-headings": true,
"list-item-indent": false,
"maximum-line-length": false
}
},
"settings": {
"commonmark": true
}
}

View File

@ -1,4 +1,4 @@
# IPFS Readme Standard
# readme-standard
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
@ -16,9 +16,9 @@ The settings are stored in the `.remarkrc` file. Ideally, this file should be ad
you plan to use `remark`. There are plans to enable a single `.remarkrc` to be used in multiple repos.
```sh
$ npm i -g remark
$ npm i
$ remark README.md -o README.md
> npm i -g remark
> npm i
> remark README.md -o README.md
```
## Contribute

View File

@ -1,23 +1,22 @@
var mdast = require('mdast')
var lint = require('mdast-lint')
var mdast = require('remark')
var lint = require('remark-lint')
var fs = require('graceful-fs')
var remarkTitle = require('remark-title')
var doc = './README.md'
// TODO Replace README with readme option
// TODO Log that the title has been replaced
fs.writeFileSync(doc, mdast().use(remarkTitle, {
title: 'IPFS Readme Standard'
}, lint).process(
fs.readFileSync(doc, 'utf8'), function (err, file, res) {
if (err) {
console.log(err)
return
}
// fs.writeFileSync(doc, mdast().use(remarkTitle, {}, lint).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!')
}
})
)
// if (file.messages[0] != null) {
// console.log(file.messages)
// } else {
// console.log('No errors found!')
// }
// })
// )

View File

@ -25,12 +25,13 @@
},
"homepage": "https://github.com/ipfs/ipfs-readme-standard#readme",
"dependencies": {
"graceful-fs": "^4.1.2",
"mdast": "^2.1.0",
"mdast-lint": "^1.1.1",
"remark-title": "^1.0.0"
"graceful-fs": "^4.1.3",
"mdast-lint": "^2.0.0",
"remark": "^4.2.1",
"remark-lint": "^3.2.0",
"remark-title": "^1.0.3"
},
"devDependencies": {
"babel-cli": "^6.3.17"
"babel-cli": "^6.7.5"
}
}