diff --git a/.remarkrc b/.remarkrc index 9e34b56..e9e8f4e 100644 --- a/.remarkrc +++ b/.remarkrc @@ -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 } -} +} \ No newline at end of file diff --git a/README.md b/README.md index fe9bf16..7c9728f 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/index.js b/index.js index 5eaaee4..7996d60 100644 --- a/index.js +++ b/index.js @@ -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!') +// } +// }) +// ) diff --git a/package.json b/package.json index 41960bf..4651162 100644 --- a/package.json +++ b/package.json @@ -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" } }