remark-usage
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -5,7 +5,12 @@ <!--remark setext--> | ||
2.1.0 / 2016-01-16 | ||
================== | ||
* Add a custom heading option ([`66f3951`](https://github.com/wooorm/remark-usage/commit/66f3951)) | ||
2.0.1 / 2015-12-25 | ||
================== | ||
* Refactor to replace mocha with tape ([a8d7a48](https://github.com/wooorm/remark-usage/commit/a8d7a48)) | ||
* Replace internal dependency of mdast > remark ([27cb95a](https://github.com/wooorm/remark-usage/commit/27cb95a)) | ||
* Refactor to replace mocha with tape ([`a8d7a48`](https://github.com/wooorm/remark-usage/commit/a8d7a48)) | ||
* Replace internal dependency of mdast > remark ([`27cb95a`](https://github.com/wooorm/remark-usage/commit/27cb95a)) | ||
@@ -15,5 +20,5 @@ 2.0.0 / 2015-12-24 | ||
* Add temporary warning to `readme.md` ([da77edf](https://github.com/wooorm/remark-usage/commit/da77edf)) | ||
* Rename `mdast-usage` > `remark-usage` ([010469a](https://github.com/wooorm/remark-usage/commit/010469a)) | ||
* Update dependencies for changes in mdast ([ae57f51](https://github.com/wooorm/remark-usage/commit/ae57f51)) | ||
* Add temporary warning to `readme.md` ([`da77edf`](https://github.com/wooorm/remark-usage/commit/da77edf)) | ||
* Rename `mdast-usage` > `remark-usage` ([`010469a`](https://github.com/wooorm/remark-usage/commit/010469a)) | ||
* Update dependencies for changes in mdast ([`ae57f51`](https://github.com/wooorm/remark-usage/commit/ae57f51)) | ||
@@ -23,4 +28,4 @@ 1.0.1 / 2015-09-15 | ||
* Fix bug when plugin ran multiple times ([e3afca1](https://github.com/wooorm/remark-usage/commit/e3afca1)) | ||
* Update dev-dependencies ([318def7](https://github.com/wooorm/remark-usage/commit/318def7)) | ||
* Fix bug when plugin ran multiple times ([`e3afca1`](https://github.com/wooorm/remark-usage/commit/e3afca1)) | ||
* Update dev-dependencies ([`318def7`](https://github.com/wooorm/remark-usage/commit/318def7)) | ||
@@ -30,8 +35,8 @@ 1.0.0 / 2015-08-19 | ||
* Add missing dev-dependency updates ([3ecdee4](https://github.com/wooorm/remark-usage/commit/3ecdee4)) | ||
* Refactor to externalise `mdast-util-heading-range` ([6212e53](https://github.com/wooorm/remark-usage/commit/6212e53)) | ||
* Fix indent in `.editorconfig` for `.mdastrc` ([e383553](https://github.com/wooorm/remark-usage/commit/e383553)) | ||
* Add missing `output` to `.mdastrc` ([82c6ac4](https://github.com/wooorm/remark-usage/commit/82c6ac4)) | ||
* Replace coveralls with codecov ([689ddfe](https://github.com/wooorm/remark-usage/commit/689ddfe)) | ||
* Update dependencies, dev-dependencies ([4f60345](https://github.com/wooorm/remark-usage/commit/4f60345)) | ||
* Add missing dev-dependency updates ([`3ecdee4`](https://github.com/wooorm/remark-usage/commit/3ecdee4)) | ||
* Refactor to externalise `mdast-util-heading-range` ([`6212e53`](https://github.com/wooorm/remark-usage/commit/6212e53)) | ||
* Fix indent in `.editorconfig` for `.mdastrc` ([`e383553`](https://github.com/wooorm/remark-usage/commit/e383553)) | ||
* Add missing `output` to `.mdastrc` ([`82c6ac4`](https://github.com/wooorm/remark-usage/commit/82c6ac4)) | ||
* Replace coveralls with codecov ([`689ddfe`](https://github.com/wooorm/remark-usage/commit/689ddfe)) | ||
* Update dependencies, dev-dependencies ([`4f60345`](https://github.com/wooorm/remark-usage/commit/4f60345)) | ||
@@ -41,3 +46,3 @@ 0.3.3 / 2015-07-12 | ||
* Remove peer-dependencies ([ddca40d](https://github.com/wooorm/remark-usage/commit/ddca40d)) | ||
* Remove peer-dependencies ([`ddca40d`](https://github.com/wooorm/remark-usage/commit/ddca40d)) | ||
@@ -47,4 +52,4 @@ 0.3.2 / 2015-07-06 | ||
* Refactor to externalise to-string utility ([1a9f1a7](https://github.com/wooorm/remark-usage/commit/1a9f1a7)) | ||
* Update mdast, eslint, dev-dependencies ([17136e8](https://github.com/wooorm/remark-usage/commit/17136e8)) | ||
* Refactor to externalise to-string utility ([`1a9f1a7`](https://github.com/wooorm/remark-usage/commit/1a9f1a7)) | ||
* Update mdast, eslint, dev-dependencies ([`17136e8`](https://github.com/wooorm/remark-usage/commit/17136e8)) | ||
@@ -54,3 +59,3 @@ 0.3.1 / 2015-06-13 | ||
* Remove positional information from parsed markdown ([16a83e3](https://github.com/wooorm/remark-usage/commit/16a83e3)) | ||
* Remove positional information from parsed markdown ([`16a83e3`](https://github.com/wooorm/remark-usage/commit/16a83e3)) | ||
@@ -60,7 +65,7 @@ 0.3.0 / 2015-06-13 | ||
* Add mdast-github, mdast-yaml-config, mdast-lint as dependencies ([162e2da](https://github.com/wooorm/remark-usage/commit/162e2da)) | ||
* Update mdast ([04292e4](https://github.com/wooorm/remark-usage/commit/04292e4)) | ||
* Add `.editorconfig` ([7153f9b](https://github.com/wooorm/remark-usage/commit/7153f9b)) | ||
* Update lint targets ([dc66f47](https://github.com/wooorm/remark-usage/commit/dc66f47)) | ||
* Update eslint, jscs-jsdoc ([a35a094](https://github.com/wooorm/remark-usage/commit/a35a094)) | ||
* Add mdast-github, mdast-yaml-config, mdast-lint as dependencies ([`162e2da`](https://github.com/wooorm/remark-usage/commit/162e2da)) | ||
* Update mdast ([`04292e4`](https://github.com/wooorm/remark-usage/commit/04292e4)) | ||
* Add `.editorconfig` ([`7153f9b`](https://github.com/wooorm/remark-usage/commit/7153f9b)) | ||
* Update lint targets ([`dc66f47`](https://github.com/wooorm/remark-usage/commit/dc66f47)) | ||
* Update eslint, jscs-jsdoc ([`a35a094`](https://github.com/wooorm/remark-usage/commit/a35a094)) | ||
@@ -70,14 +75,14 @@ 0.2.0 / 2015-03-24 | ||
* Update `travis.yml` ([bc226da](https://github.com/wooorm/remark-usage/commit/bc226da)) | ||
* Refactor variable declarations ([d40fba5](https://github.com/wooorm/remark-usage/commit/d40fba5)) | ||
* Update docs for changes in mdast ([b12a282](https://github.com/wooorm/remark-usage/commit/b12a282)) | ||
* Update for CLI updates in mdast ([67ed2b0](https://github.com/wooorm/remark-usage/commit/67ed2b0)) | ||
* Refactor plugin mechanism ([ce15fde](https://github.com/wooorm/remark-usage/commit/ce15fde)) | ||
* Fix mocha ([448ffdd](https://github.com/wooorm/remark-usage/commit/448ffdd)) | ||
* Remove CLI ([0337183](https://github.com/wooorm/remark-usage/commit/0337183)) | ||
* Remove browser env from eslint ([ad0da17](https://github.com/wooorm/remark-usage/commit/ad0da17)) | ||
* Update chalk ([cae2df4](https://github.com/wooorm/remark-usage/commit/cae2df4)) | ||
* Update eslint ([27a4d37](https://github.com/wooorm/remark-usage/commit/27a4d37)) | ||
* Update `travis.yml` ([`bc226da`](https://github.com/wooorm/remark-usage/commit/bc226da)) | ||
* Refactor variable declarations ([`d40fba5`](https://github.com/wooorm/remark-usage/commit/d40fba5)) | ||
* Update docs for changes in mdast ([`b12a282`](https://github.com/wooorm/remark-usage/commit/b12a282)) | ||
* Update for CLI updates in mdast ([`67ed2b0`](https://github.com/wooorm/remark-usage/commit/67ed2b0)) | ||
* Refactor plugin mechanism ([`ce15fde`](https://github.com/wooorm/remark-usage/commit/ce15fde)) | ||
* Fix mocha ([`448ffdd`](https://github.com/wooorm/remark-usage/commit/448ffdd)) | ||
* Remove CLI ([`0337183`](https://github.com/wooorm/remark-usage/commit/0337183)) | ||
* Remove browser env from eslint ([`ad0da17`](https://github.com/wooorm/remark-usage/commit/ad0da17)) | ||
* Update chalk ([`cae2df4`](https://github.com/wooorm/remark-usage/commit/cae2df4)) | ||
* Update eslint ([`27a4d37`](https://github.com/wooorm/remark-usage/commit/27a4d37)) | ||
0.1.0 / 2015-01-28 | ||
================== |
21
index.js
@@ -56,3 +56,19 @@ /** | ||
/* | ||
* Constants. | ||
*/ | ||
var DEFAULT_HEADING = 'usage'; | ||
/** | ||
* Transform a string into an applicable expression. | ||
* | ||
* @param {string} value - Content to expressionise. | ||
* @return {RegExp} - Expression from `value`. | ||
*/ | ||
function toExpression(value) { | ||
return new RegExp('^(' + value + ')$', 'i'); | ||
} | ||
/** | ||
* Preprocess `value` to add IDs to | ||
@@ -344,2 +360,3 @@ * `console.log` invocations. | ||
var cwd; | ||
var header; | ||
@@ -396,3 +413,5 @@ if (options === null || options === undefined) { | ||
remark.use(heading(/^usage$/i, runFactory(settings))); | ||
header = toExpression(options.heading || DEFAULT_HEADING); | ||
remark.use(heading(header, runFactory(settings))); | ||
} | ||
@@ -399,0 +418,0 @@ |
{ | ||
"name": "remark-usage", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Add a usage example to your README", | ||
@@ -12,3 +12,7 @@ "license": "MIT", | ||
], | ||
"repository": "wooorm/remark-usage", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/wooorm/remark-usage.git" | ||
}, | ||
"bugs": "https://github.com/wooorm/remark-usage/issues", | ||
"author": "Titus Wormer <tituswormer@gmail.com>", | ||
@@ -31,3 +35,3 @@ "files": [ | ||
"jscs-jsdoc": "^1.0.0", | ||
"remark-github": "^2.0.0", | ||
"remark-github": "^3.0.0", | ||
"remark-lint": "^2.0.0", | ||
@@ -34,0 +38,0 @@ "remark-slug": "^3.0.0", |
@@ -5,10 +5,2 @@ # remark-usage [![Build Status](https://img.shields.io/travis/wooorm/remark-usage.svg)](https://travis-ci.org/wooorm/remark-usage) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/remark-usage.svg)](https://codecov.io/github/wooorm/remark-usage) | ||
> :warning: **mdast is currently being renamed to remark** :warning: | ||
> | ||
> This means all plug-ins and relating projects change too, causing many | ||
> changes across the ecosystem. Expect the dust to settle in roughly a day. | ||
> | ||
> See this project at the previous stable commit | ||
> [c4a51d1](https://github.com/wooorm/remark-github/commit/c4a51d1). | ||
## Installation | ||
@@ -118,4 +110,7 @@ | ||
* `heading` (string?, default: `"usage"`) — Heading to look for, | ||
wrapped in `new RegExp('^(' + value + ')$', 'i');`. | ||
## License | ||
[MIT](LICENSE) © [Titus Wormer](http://wooorm.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
19189
341
5
115