remark-retext
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "remark-retext", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "retext support for remark", | ||
@@ -12,6 +12,3 @@ "license": "MIT", | ||
], | ||
"files": [ | ||
"index.js" | ||
], | ||
"repository": "https://github.com/wooorm/remark-retext", | ||
"repository": "wooorm/remark-retext", | ||
"bugs": "https://github.com/wooorm/remark-retext/issues", | ||
@@ -22,2 +19,5 @@ "author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
], | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": { | ||
@@ -29,6 +29,6 @@ "mdast-util-to-nlcst": "^3.0.0" | ||
"esmangle": "^1.0.1", | ||
"nyc": "^10.0.0", | ||
"remark-cli": "^2.0.0", | ||
"nyc": "^11.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-parse": "^3.0.0", | ||
"remark-preset-wooorm": "^1.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
"remark-stringify": "^3.0.0", | ||
@@ -39,6 +39,6 @@ "retext-english": "^3.0.0", | ||
"unified": "^6.0.0", | ||
"xo": "^0.17.1" | ||
"xo": "^0.18.0" | ||
}, | ||
"scripts": { | ||
"build-md": "remark . --quiet --frail", | ||
"build-md": "remark . -qfo", | ||
"build-bundle": "browserify index.js --bare -s remarkRetext > remark-retext.js", | ||
@@ -60,2 +60,3 @@ "build-mangle": "esmangle remark-retext.js > remark-retext.min.js", | ||
"space": true, | ||
"esnext": false, | ||
"ignores": [ | ||
@@ -66,5 +67,6 @@ "remark-retext.js" | ||
"remarkConfig": { | ||
"output": true, | ||
"presets": "wooorm" | ||
"plugins": [ | ||
"preset-wooorm" | ||
] | ||
} | ||
} |
@@ -15,34 +15,36 @@ # remark-retext [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
Say we have the following file, `example.md`: | ||
```markdown | ||
## Hello guys! | ||
``` | ||
And our script, `example.js`, looks as follows: | ||
```javascript | ||
var vfile = require('to-vfile'); | ||
var report = require('vfile-reporter'); | ||
var unified = require('unified'); | ||
var parse = require('remark-parse'); | ||
var lint = require('remark-lint'); | ||
var stringify = require('remark-stringify'); | ||
var remark2retext = require('remark-retext'); | ||
var english = require('retext-english'); | ||
var equality = require('retext-equality'); | ||
var stringify = require('remark-stringify'); | ||
var report = require('vfile-reporter'); | ||
unified() | ||
.use(parse) | ||
.use(lint) | ||
.use(remark2retext, unified().use(english).use(equality)) | ||
.use(stringify) | ||
.process('## Hello guys!', function (err, file) { | ||
file.filename = 'example'; | ||
file.extension = 'md'; | ||
process.stderr.write(report(file) + '\n'); | ||
}); | ||
.use(parse) | ||
.use(remark2retext, unified().use(english).use(equality)) | ||
.use(stringify) | ||
.process(vfile.readSync('example.md'), function (err, file) { | ||
console.error(report(err || file)); | ||
}); | ||
``` | ||
**stderr**(4) yields: | ||
Now, running `node example` yields: | ||
```txt | ||
```text | ||
example.md | ||
1 warning Missing newline character at end of file final-newline | ||
1-1:15 warning First heading level should be `1` first-heading-level | ||
1-1:15 warning Don’t add a trailing `!` to headings no-heading-punctuation | ||
10-1:14 warning `guys` may be insensitive, use `people`, `persons`, `folks` instead gals-men | ||
1:10-1:14 warning `guys` may be insensitive, use `people`, `persons`, `folks` instead gals-men retext-equality | ||
⚠ 4 warnings | ||
⚠ 1 warning | ||
``` | ||
@@ -70,2 +72,11 @@ | ||
## Related | ||
* [`rehype-retext`](https://github.com/wooorm/rehype-retext) | ||
— Transform HTML to [NLCST][] | ||
* [`remark-rehype`](https://github.com/wooorm/remark-rehype) | ||
— Transform markdown to HTML | ||
* [`rehype-remark`](https://github.com/wooorm/rehype-remark) | ||
— Transform HTML to markdown | ||
## License | ||
@@ -72,0 +83,0 @@ |
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 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
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 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
6667
117