git.iko.soy/typeable/remark-validate-links
on main help sign in
Rename `mdast-validate-links` > `remark-validate-links`
commitc9e9391df295c1d0a3144f00c2b9667c4f3b0ed5 authorTitus Wormer <tituswormer@gmail.com> dateThu 24 Dec 2015, 17:43 (11 years ago) parentf8fc60d
5 files changed+53−53
history.md+9−9 index.js+9−9 package.json+8−8 readme.md+15−15 test/index.js+12−12
history.md+9−9
@@ -5,39 +5,39 @@
551.1.1 / 2015-09-18
66==================
77
8−* Add support for future changes in unified ([fab6a89](https://github.com/wooorm/mdast-validate-links/commit/fab6a89))
9−* Add related section, table-of-contents ([0b6c35b](https://github.com/wooorm/mdast-validate-links/commit/0b6c35b))
8+* Add support for future changes in unified ([fab6a89](https://github.com/wooorm/remark-validate-links/commit/fab6a89))
9+* Add related section, table-of-contents ([0b6c35b](https://github.com/wooorm/remark-validate-links/commit/0b6c35b))
1010
11111.1.0 / 2015-09-07
1212==================
1313
14−* Add support for changes in mdast-slug ([8749876](https://github.com/wooorm/mdast-validate-links/commit/8749876))
15−* Update test fixtures for updates in mdast ([e9b32d4](https://github.com/wooorm/mdast-validate-links/commit/e9b32d4))
14+* Add support for changes in mdast-slug ([8749876](https://github.com/wooorm/remark-validate-links/commit/8749876))
15+* Update test fixtures for updates in mdast ([e9b32d4](https://github.com/wooorm/remark-validate-links/commit/e9b32d4))
1616
17171.0.0 / 2015-08-20
1818==================
1919
20−* Update dependencies, dev-dependencies ([986797a](https://github.com/wooorm/mdast-validate-links/commit/986797a))
20+* Update dependencies, dev-dependencies ([986797a](https://github.com/wooorm/remark-validate-links/commit/986797a))
2121
22220.3.1 / 2015-07-27
2323==================
2424
25−* Fix for changes in mdast ([e9702cf](https://github.com/wooorm/mdast-validate-links/commit/e9702cf))
25+* Fix for changes in mdast ([e9702cf](https://github.com/wooorm/remark-validate-links/commit/e9702cf))
2626
27270.3.0 / 2015-07-26
2828==================
2929
30−* Add suggestions for similar references on failure ([ddabfe2](https://github.com/wooorm/mdast-validate-links/commit/ddabfe2))
30+* Add suggestions for similar references on failure ([ddabfe2](https://github.com/wooorm/remark-validate-links/commit/ddabfe2))
3131
32320.2.1 / 2015-07-19
3333==================
3434
35−* Update mdast ([10411ef](https://github.com/wooorm/mdast-validate-links/commit/10411ef))
35+* Update mdast ([10411ef](https://github.com/wooorm/remark-validate-links/commit/10411ef))
3636
37370.2.0 / 2015-07-19
3838==================
3939
40−* Add support for inspecting referenced files ([763c0d1](https://github.com/wooorm/mdast-validate-links/commit/763c0d1))
40+* Add support for inspecting referenced files ([763c0d1](https://github.com/wooorm/remark-validate-links/commit/763c0d1))
4141
42420.1.0 / 2015-07-18
4343==================
index.js+9−9
@@ -2,7 +2,7 @@
22 * @author Titus Wormer
33 * @copyright 2015 Titus Wormer
44 * @license MIT
5− * @module mdast:validate-links
5+ * @module remark:validate-links
66 * @fileoverview Validate links to headings and files in markdown.
77 */
88
@@ -284,7 +284,7 @@ function gatherExposedFactory() {
284284 function done() {
285285 if (hasHeadings && !hasSlugs) {
286286 throw new Error(
287− 'Missing slugs. Use for example `mdast-slug` to generate ' +
287+ 'Missing slugs. Use for example `remark-slug` to generate ' +
288288 'heading IDs'
289289 );
290290 }
@@ -371,7 +371,7 @@ function validate(exposed, file, project) {
371371 /*
372372 * Check if files without `hash` can be linked to.
373373 * Because there’s no need to inspect those files
374− * for headings they are not added to mdast. This
374+ * for headings they are not added to remark. This
375375 * is especially useful because they might be
376376 * non-markdown files. Here we check if they exist.
377377 */
@@ -448,7 +448,7 @@ function completerFactory(project) {
448448 done();
449449 }
450450
451− completer.pluginId = 'mdast-validate-links';
451+ completer.pluginId = 'remark-validate-links';
452452
453453 return completer;
454454}
@@ -513,16 +513,16 @@ function transformerFactory(project, fileSet) {
513513 * Attacher.
514514 *
515515 * @example
516− * attacher(mdast())
517− * // [Error: mdast-validate-links only works on the CLI]
516+ * attacher(remark())
517+ * // [Error: remark-validate-links only works on the CLI]
518518 *
519− * @param {MDAST} mdast - Processor.
519+ * @param {Remark} remark - Processor.
520520 * @param {Object?} options - Settings.
521521 * @param {FileSet?} fileSet - Virtual file-set.
522522 * @throws {Error} - When `fileSet` is not given (when not on
523523 * the CLI).
524524 */
525−function attacher(mdast, options, fileSet) {
525+function attacher(remark, options, fileSet) {
526526 var repo = (options || {}).repository;
527527 var pack;
528528
@@ -531,7 +531,7 @@ function attacher(mdast, options, fileSet) {
531531 */
532532
533533 if (!fileSet) {
534− throw new Error('mdast-validate-links only works on the CLI');
534+ throw new Error('remark-validate-links only works on the CLI');
535535 }
536536
537537 /*
package.json+8−8
@@ -1,5 +1,5 @@
11{
2− "name": "mdast-validate-links",
2+ "name": "remark-validate-links",
33 "version": "1.1.1",
44 "description": "Validate links to headings and files in markdown",
55 "license": "MIT",
@@ -9,17 +9,17 @@
99 "reference",
1010 "file",
1111 "heading",
12− "mdast"
12+ "remark"
1313 ],
1414 "dependencies": {
1515 "github-url-to-object": "^2.1.0",
16− "mdast-slug": "^2.0.0",
16+ "remark-slug": "^3.0.0",
1717 "mdast-util-definitions": "^1.0.0",
1818 "unist-util-visit": "^1.0.0",
1919 "propose": "0.0.5",
2020 "urljoin": "^0.1.5"
2121 },
22− "repository": "wooorm/mdast-validate-links",
22+ "repository": "wooorm/remark-validate-links",
2323 "author": "Titus Wormer <tituswormer@gmail.com>",
2424 "files": [
2525 "index.js"
@@ -30,10 +30,10 @@
3030 "istanbul": "^0.4.0",
3131 "jscs": "^2.0.0",
3232 "jscs-jsdoc": "^1.0.0",
33− "mdast": "^2.2.2",
34− "mdast-comment-config": "^1.0.0",
35− "mdast-github": "^1.0.0",
36− "mdast-lint": "^1.0.0",
33+ "mdast": "^3.0.0-alpha.5",
34+ "mdast-comment-config": "^2.0.0-alpha.1",
35+ "mdast-github": "^2.0.0-alpha.1",
36+ "mdast-lint": "^2.0.0-alpha.1",
3737 "mdast-toc": "^1.0.0",
3838 "mocha": "^2.0.0"
3939 },
readme.md+15−15
@@ -1,6 +1,6 @@
1−# mdast-validate-links [![Build Status](https://img.shields.io/travis/wooorm/mdast-validate-links.svg)](https://travis-ci.org/wooorm/mdast-validate-links) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/mdast-validate-links.svg)](https://codecov.io/github/wooorm/mdast-validate-links)
1+# remark-validate-links [![Build Status](https://img.shields.io/travis/wooorm/remark-validate-links.svg)](https://travis-ci.org/wooorm/remark-validate-links) [![Coverage Status](https://img.shields.io/codecov/c/github/wooorm/remark-validate-links.svg)](https://codecov.io/github/wooorm/remark-validate-links)
22
3−[**mdast**](https://github.com/wooorm/mdast) plug-in to validate if links to
3+[**remark**](https://github.com/wooorm/remark) plug-in to validate if links to
44headings and files in markdown point to existing things.
55
66For example, this document does not have a heading named `Hello`. So if I
@@ -27,18 +27,18 @@ is fine.
2727[npm](https://docs.npmjs.com/cli/install):
2828
2929```bash
30−npm install mdast-validate-links
30+npm install remark-validate-links
3131```
3232
3333## Command line
3434
35−![Example of how mdast-validate-links looks on screen](https://cdn.rawgit.com/wooorm/mdast-validate-links/master/screenshot.png)
35+![Example of how remark-validate-links looks on screen](https://cdn.rawgit.com/wooorm/remark-validate-links/master/screenshot.png)
3636
37−Use **mdast-validate-links** together with [**mdast**](https://github.com/wooorm/mdast)
38−and [**mdast-slug**](https://github.com/wooorm/mdast-slug):
37+Use **remark-validate-links** together with [**remark**](https://github.com/wooorm/remark)
38+and [**remark-slug**](https://github.com/wooorm/remark-slug):
3939
4040```bash
41−npm install --global mdast mdast-slug mdast-validate-links
41+npm install --global remark remark-slug remark-validate-links
4242```
4343
4444Let’s say `readme.md` is this document, and `example.md` looks as follows:
@@ -55,10 +55,10 @@ But this does exist: [LICENSE](LICENSE).
5555So does this: [README](readme.md#installation).
5656```
5757
58−Then, to run **mdast-validate-links** on `example.md` and `readme.md`:
58+Then, to run **remark-validate-links** on `example.md` and `readme.md`:
5959
6060```bash
61−mdast -u mdast-slug -u mdast-validate-links example.md
61+remark -u remark-slug -u remark-validate-links example.md
6262#
6363# Yields:
6464#
@@ -71,25 +71,25 @@ mdast -u mdast-slug -u mdast-validate-links example.md
7171
7272## Programmatic
7373
74−This plug-in is **not** available on the API of mdast.
74+This plug-in is **not** available on the API of remark.
7575
7676## Configuration
7777
7878You can pass a `repository`, containing anything `package.json`s
7979[`repository`](https://docs.npmjs.com/files/package.json#repository) can
80−handle. If this is omitted, **mdast-validate-links** will try
80+handle. If this is omitted, **remark-validate-links** will try
8181the `package.json` in your current working directory.
8282
8383```bash
84−mdast --use 'validate-links=repository:"foo/bar"' example.md
84+remark --use 'validate-links=repository:"foo/bar"' example.md
8585```
8686
8787When a repository is given or detected, links to GitHub are normalized
8888to the file-system. E.g., `https://github.com/foo/bar/blob/master/example.md`
8989becomes `example.md`.
9090
91−You can define this repository in `.mdastrc` or `package.json` [files](https://github.com/wooorm/mdast/blob/master/doc/mdastrc.5.md)
92−too. An example `.mdastrc` file could look as follows:
91+You can define this repository in `.remarkrc` or `package.json` [files](https://github.com/wooorm/remark/blob/master/doc/remarkrc.5.md)
92+too. An example `.remarkrc` file could look as follows:
9393
9494```json
9595{
@@ -106,7 +106,7 @@ too. An example `.mdastrc` file could look as follows:
106106
107107## Related
108108
109−* [`mdast-lint`](https://github.com/wooorm/mdast-lint)
109+* [`remark-lint`](https://github.com/wooorm/remark-lint)
110110 — Markdown code style linter.
111111
112112## License
test/index.js+12−12
@@ -2,8 +2,8 @@
22 * @author Titus Wormer
33 * @copyright 2015 Titus Wormer
44 * @license MIT
5− * @module mdast:validate-links:test
6− * @fileoverview Test suite for `mdast-validate-links`.
5+ * @module remark:validate-links:test
6+ * @fileoverview Test suite for `remark-validate-links`.
77 */
88
99'use strict';
@@ -64,7 +64,7 @@ function test(config, callback) {
6464 * Tests.
6565 */
6666
67−describe('mdast-validate-links', function () {
67+describe('remark-validate-links', function () {
6868 beforeEach(function () {
6969 process.chdir('./test/fixtures');
7070 });
@@ -76,7 +76,7 @@ describe('mdast-validate-links', function () {
7676 it('should throw an error when not on the CLI', function () {
7777 assert.throws(function () {
7878 mdast().use(links);
79− }, /Error: mdast-validate-links only works on the CLI/);
79+ }, /Error: remark-validate-links only works on the CLI/);
8080 });
8181
8282 it('should warn when used without slugs', function (done) {
@@ -92,7 +92,7 @@ describe('mdast-validate-links', function () {
9292 equal(res.stderr.split('\n').slice(0, 2).join('\n'), [
9393 'example.md',
9494 ' 1:1 error Error: Missing slugs. Use for ' +
95− 'example `mdast-slug` to generate heading IDs'
95+ 'example `remark-slug` to generate heading IDs'
9696 ].join('\n'));
9797
9898 done(err);
@@ -106,7 +106,7 @@ describe('mdast-validate-links', function () {
106106 'detectRC': false,
107107 'detectIgnore': false,
108108 'plugins': [
109− '../../../node_modules/mdast-slug',
109+ '../../../node_modules/remark-slug',
110110 '../../../index.js'
111111 ]
112112 }, function (err, res) {
@@ -134,7 +134,7 @@ describe('mdast-validate-links', function () {
134134 'detectRC': false,
135135 'detectIgnore': false,
136136 'plugins': [
137− '../../../node_modules/mdast-slug',
137+ '../../../node_modules/remark-slug',
138138 '../../../index.js'
139139 ]
140140 }, function (err, res) {
@@ -176,7 +176,7 @@ describe('mdast-validate-links', function () {
176176 'detectRC': false,
177177 'detectIgnore': false,
178178 'plugins': [
179− '../../../node_modules/mdast-slug',
179+ '../../../node_modules/remark-slug',
180180 '../../../index.js'
181181 ]
182182 }, function (err, res) {
@@ -229,7 +229,7 @@ describe('mdast-validate-links', function () {
229229 'detectRC': false,
230230 'detectIgnore': false,
231231 'plugins': [
232− '../../../node_modules/mdast-slug',
232+ '../../../node_modules/remark-slug',
233233 '../../../index.js'
234234 ]
235235 }, function (err, res) {
@@ -255,7 +255,7 @@ describe('mdast-validate-links', function () {
255255 'detectRC': false,
256256 'detectIgnore': false,
257257 'plugins': {
258− '../../../node_modules/mdast-slug': null,
258+ '../../../node_modules/remark-slug': null,
259259 '../../../index.js': {
260260 'repository': 'wooorm/test'
261261 }
@@ -350,7 +350,7 @@ describe('mdast-validate-links', function () {
350350 'detectRC': false,
351351 'detectIgnore': false,
352352 'plugins': [
353− '../../../node_modules/mdast-slug',
353+ '../../../node_modules/remark-slug',
354354 '../../../index.js'
355355 ]
356356 }, function (err, res) {
@@ -436,7 +436,7 @@ describe('mdast-validate-links', function () {
436436 'detectRC': false,
437437 'detectIgnore': false,
438438 'plugins': [
439− '../../../node_modules/mdast-slug',
439+ '../../../node_modules/remark-slug',
440440 '../../../index.js'
441441 ]
442442 }, function (err, res) {