Skip to content

Commit a6590c4

Browse files
committed
Rename mdast-toc > remark-toc
1 parent a83ac47 commit a6590c4

File tree

14 files changed

+151
-152
lines changed

14 files changed

+151
-152
lines changed

.eslintignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ components/
33
coverage/
44
build.js
55
example.js
6-
mdast-toc.js
7-
mdast-toc.min.js
6+
remark-toc.js
7+
remark-toc.min.js

.jscs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"coverage/",
66
"node_modules/",
77
"build.js",
8-
"mdast-toc.js",
9-
"mdast-toc.min.js"
8+
"remark-toc.js",
9+
"remark-toc.min.js"
1010
],
1111
"jsDoc": {
1212
"checkAnnotations": "jsdoc3",

.mdastrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"comment-config",
55
"lint",
66
"github",
7-
"usage",
87
"./",
98
"validate-links"
109
],

bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "mdast-toc",
3-
"main": "mdast-toc.js",
2+
"name": "remark-toc",
3+
"main": "remark-toc.js",
44
"description": "Generate a Table of Contents (TOC) for Markdown files",
55
"license": "MIT",
66
"keywords": [
@@ -14,11 +14,11 @@
1414
"content",
1515
"toc",
1616
"generation",
17-
"mdast"
17+
"remark"
1818
],
1919
"repository": {
2020
"type": "git",
21-
"url": "https://github.com/wooorm/mdast-toc.git"
21+
"url": "https://github.com/wooorm/remark-toc.git"
2222
},
2323
"authors": [
2424
"Titus Wormer <tituswormer@gmail.com>"

component.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "mdast-toc",
2+
"name": "remark-toc",
33
"version": "1.2.0",
44
"description": "Generate a Table of Contents (TOC) for Markdown files",
55
"license": "MIT",
@@ -14,13 +14,13 @@
1414
"content",
1515
"toc",
1616
"generation",
17-
"mdast"
17+
"remark"
1818
],
1919
"dependencies": {
20-
"wooorm/mdast-slug": "^2.0.0",
20+
"wooorm/remark-slug": "^2.0.0",
2121
"wooorm/mdast-util-to-string": "^1.0.0"
2222
},
23-
"repository": "wooorm/mdast-toc",
23+
"repository": "wooorm/remark-toc",
2424
"scripts": [
2525
"index.js"
2626
]

example.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Require/read dependencies:
22
var toc = require('./index.js');
33
var fs = require('fs');
4-
var mdast = require('mdast').use(toc);
4+
var remark = require('remark').use(toc);
55
var readme = fs.readFileSync('readme.md', 'utf-8');
66

77
// Parse markdown (this TOC is the 14th child).
8-
var contents = mdast.run(mdast.parse(readme)).children[14];
8+
var contents = remark.run(remark.parse(readme)).children[14];
99

1010
// Stringify:
11-
var doc = mdast.stringify(contents);
11+
var doc = remark.stringify(contents);
1212

1313
// Yields:
1414
console.log('markdown', doc);

history.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,88 +5,88 @@
55
1.2.0 / 2015-11-02
66
==================
77

8-
* Add support for compiling tight list-items ([777ce71](https://github.com/wooorm/mdast-toc/commit/777ce71))
8+
* Add support for compiling tight list-items ([777ce71](https://github.com/wooorm/remark-toc/commit/777ce71))
99

1010
1.1.0 / 2015-09-07
1111
==================
1212

13-
* Update mdast-slug ([a3efb80](https://github.com/wooorm/mdast-toc/commit/a3efb80))
13+
* Update mdast-slug ([a3efb80](https://github.com/wooorm/remark-toc/commit/a3efb80))
1414

1515
1.0.0 / 2015-08-20
1616
==================
1717

18-
* Update dependencies, dev-dependencies ([88694d3](https://github.com/wooorm/mdast-toc/commit/88694d3))
18+
* Update dependencies, dev-dependencies ([88694d3](https://github.com/wooorm/remark-toc/commit/88694d3))
1919

2020
0.5.1 / 2015-07-12
2121
==================
2222

23-
* Remove travis deploy ([0a28af3](https://github.com/wooorm/mdast-toc/commit/0a28af3))
24-
* Update mdast, eslint ([4127163](https://github.com/wooorm/mdast-toc/commit/4127163))
25-
* Remove prepublish script ([f8ff46a](https://github.com/wooorm/mdast-toc/commit/f8ff46a))
26-
* Refactor to externalise slug, to-string functions ([9468c08](https://github.com/wooorm/mdast-toc/commit/9468c08))
23+
* Remove travis deploy ([0a28af3](https://github.com/wooorm/remark-toc/commit/0a28af3))
24+
* Update mdast, eslint ([4127163](https://github.com/wooorm/remark-toc/commit/4127163))
25+
* Remove prepublish script ([f8ff46a](https://github.com/wooorm/remark-toc/commit/f8ff46a))
26+
* Refactor to externalise slug, to-string functions ([9468c08](https://github.com/wooorm/remark-toc/commit/9468c08))
2727

2828
0.5.0 / 2015-06-21
2929
==================
3030

31-
* Add `maxDepth` option to specify which levels are included ([24163f6](https://github.com/wooorm/mdast-toc/commit/24163f6))
32-
* Refactor tests to use mochas string diffing ([81a288a](https://github.com/wooorm/mdast-toc/commit/81a288a))
33-
* Add slugs to `attributes.id` on headings ([042a7fe](https://github.com/wooorm/mdast-toc/commit/042a7fe))
34-
* eslint, mdast, mdast-lint ([e411745](https://github.com/wooorm/mdast-toc/commit/e411745))
31+
* Add `maxDepth` option to specify which levels are included ([24163f6](https://github.com/wooorm/remark-toc/commit/24163f6))
32+
* Refactor tests to use mochas string diffing ([81a288a](https://github.com/wooorm/remark-toc/commit/81a288a))
33+
* Add slugs to `attributes.id` on headings ([042a7fe](https://github.com/wooorm/remark-toc/commit/042a7fe))
34+
* eslint, mdast, mdast-lint ([e411745](https://github.com/wooorm/remark-toc/commit/e411745))
3535

3636
0.4.2 / 2015-06-14
3737
==================
3838

39-
* Remove `.npmignore` in favour of `files` in `package.json` ([a1f69d1](https://github.com/wooorm/mdast-toc/commit/a1f69d1))
40-
* Add mdast-lint as a dev-dependency ([4c5c70c](https://github.com/wooorm/mdast-toc/commit/4c5c70c))
41-
* Refactor lint targets ([741a942](https://github.com/wooorm/mdast-toc/commit/741a942))
42-
* Add `.editorconfig` ([b85a9e9](https://github.com/wooorm/mdast-toc/commit/b85a9e9))
43-
* Update mdast, mdast-usage, mdast-yaml-config ([9385f46](https://github.com/wooorm/mdast-toc/commit/9385f46))
44-
* Update eslint, rebuild with newer browserify ([3cdc9ee](https://github.com/wooorm/mdast-toc/commit/3cdc9ee))
39+
* Remove `.npmignore` in favour of `files` in `package.json` ([a1f69d1](https://github.com/wooorm/remark-toc/commit/a1f69d1))
40+
* Add mdast-lint as a dev-dependency ([4c5c70c](https://github.com/wooorm/remark-toc/commit/4c5c70c))
41+
* Refactor lint targets ([741a942](https://github.com/wooorm/remark-toc/commit/741a942))
42+
* Add `.editorconfig` ([b85a9e9](https://github.com/wooorm/remark-toc/commit/b85a9e9))
43+
* Update mdast, mdast-usage, mdast-yaml-config ([9385f46](https://github.com/wooorm/remark-toc/commit/9385f46))
44+
* Update eslint, rebuild with newer browserify ([3cdc9ee](https://github.com/wooorm/remark-toc/commit/3cdc9ee))
4545

4646
0.4.1 / 2015-06-03
4747
==================
4848

49-
* Refactor `readme.md` style ([ecdd359](https://github.com/wooorm/mdast-toc/commit/ecdd359))
50-
* Rename `History.md`, `Readme.md` to lower-case ([c5d268e](https://github.com/wooorm/mdast-toc/commit/c5d268e))
51-
* Fix liter-dash support in GitHub support ([e77ecc7](https://github.com/wooorm/mdast-toc/commit/e77ecc7))
49+
* Refactor `readme.md` style ([ecdd359](https://github.com/wooorm/remark-toc/commit/ecdd359))
50+
* Rename `History.md`, `Readme.md` to lower-case ([c5d268e](https://github.com/wooorm/remark-toc/commit/c5d268e))
51+
* Fix liter-dash support in GitHub support ([e77ecc7](https://github.com/wooorm/remark-toc/commit/e77ecc7))
5252

5353
0.4.0 / 2015-05-25
5454
==================
5555

56-
* Fix style of generated TOCs ([d0eaf12](https://github.com/wooorm/mdast-toc/commit/d0eaf12))
57-
* Update slug ([e2a1a00](https://github.com/wooorm/mdast-toc/commit/e2a1a00))
58-
* Update mdast ([91c5475](https://github.com/wooorm/mdast-toc/commit/91c5475))
59-
* Update mdast-github ([d49a037](https://github.com/wooorm/mdast-toc/commit/d49a037))
60-
* Update jscs-jsdoc ([9bc6b8a](https://github.com/wooorm/mdast-toc/commit/9bc6b8a))
61-
* Update eslint ([67049ff](https://github.com/wooorm/mdast-toc/commit/67049ff))
62-
* Update browserify ([9a3d923](https://github.com/wooorm/mdast-toc/commit/9a3d923))
63-
* Fix lock for component ([9ac39bc](https://github.com/wooorm/mdast-toc/commit/9ac39bc))
56+
* Fix style of generated TOCs ([d0eaf12](https://github.com/wooorm/remark-toc/commit/d0eaf12))
57+
* Update slug ([e2a1a00](https://github.com/wooorm/remark-toc/commit/e2a1a00))
58+
* Update mdast ([91c5475](https://github.com/wooorm/remark-toc/commit/91c5475))
59+
* Update mdast-github ([d49a037](https://github.com/wooorm/remark-toc/commit/d49a037))
60+
* Update jscs-jsdoc ([9bc6b8a](https://github.com/wooorm/remark-toc/commit/9bc6b8a))
61+
* Update eslint ([67049ff](https://github.com/wooorm/remark-toc/commit/67049ff))
62+
* Update browserify ([9a3d923](https://github.com/wooorm/remark-toc/commit/9a3d923))
63+
* Fix lock for component ([9ac39bc](https://github.com/wooorm/remark-toc/commit/9ac39bc))
6464

6565
0.3.0 / 2015-04-11
6666
==================
6767

68-
* Add mdast-github, mdst-yaml-config as dev-dependencies ([2adaf3a](https://github.com/wooorm/mdast-toc/commit/2adaf3a))
69-
* Add support for custom libraries, headings ([0409c42](https://github.com/wooorm/mdast-toc/commit/0409c42))
70-
* Update eslint ([fbf1829](https://github.com/wooorm/mdast-toc/commit/fbf1829))
71-
* Update mdast ([c9e114e](https://github.com/wooorm/mdast-toc/commit/c9e114e))
68+
* Add mdast-github, mdst-yaml-config as dev-dependencies ([2adaf3a](https://github.com/wooorm/remark-toc/commit/2adaf3a))
69+
* Add support for custom libraries, headings ([0409c42](https://github.com/wooorm/remark-toc/commit/0409c42))
70+
* Update eslint ([fbf1829](https://github.com/wooorm/remark-toc/commit/fbf1829))
71+
* Update mdast ([c9e114e](https://github.com/wooorm/remark-toc/commit/c9e114e))
7272

7373
0.2.0 / 2015-03-25
7474
==================
7575

76-
* Update `travis.yml` ([a1362f3](https://github.com/wooorm/mdast-toc/commit/a1362f3))
77-
* Remove superfluous bower dependency ([1dadfae](https://github.com/wooorm/mdast-toc/commit/1dadfae))
78-
* Update for CLI updates in mdast ([2defcfa](https://github.com/wooorm/mdast-toc/commit/2defcfa))
79-
* Refactor plugin mechanism ([bd77ab7](https://github.com/wooorm/mdast-toc/commit/bd77ab7))
80-
* Remove CLI ([fab822a](https://github.com/wooorm/mdast-toc/commit/fab822a))
81-
* Update mdast-usage ([6d2cb48](https://github.com/wooorm/mdast-toc/commit/6d2cb48))
82-
* Update eslint ([44f1a3e](https://github.com/wooorm/mdast-toc/commit/44f1a3e))
83-
* Fix invalid links in `History.md` ([56db35b](https://github.com/wooorm/mdast-toc/commit/56db35b))
76+
* Update `travis.yml` ([a1362f3](https://github.com/wooorm/remark-toc/commit/a1362f3))
77+
* Remove superfluous bower dependency ([1dadfae](https://github.com/wooorm/remark-toc/commit/1dadfae))
78+
* Update for CLI updates in mdast ([2defcfa](https://github.com/wooorm/remark-toc/commit/2defcfa))
79+
* Refactor plugin mechanism ([bd77ab7](https://github.com/wooorm/remark-toc/commit/bd77ab7))
80+
* Remove CLI ([fab822a](https://github.com/wooorm/remark-toc/commit/fab822a))
81+
* Update mdast-usage ([6d2cb48](https://github.com/wooorm/remark-toc/commit/6d2cb48))
82+
* Update eslint ([44f1a3e](https://github.com/wooorm/remark-toc/commit/44f1a3e))
83+
* Fix invalid links in `History.md` ([56db35b](https://github.com/wooorm/remark-toc/commit/56db35b))
8484

8585
0.1.1 / 2015-03-13
8686
==================
8787

88-
* Fix typo in CLIs help ([969cfe9](https://github.com/wooorm/mdast-toc/commit/969cfe9))
89-
* Refactor code style in `cli.js` ([f92feca](https://github.com/wooorm/mdast-toc/commit/f92feca))
90-
* Fix stringified output of lists for fixtures ([9ba50af](https://github.com/wooorm/mdast-toc/commit/9ba50af))
91-
* Fix `test-api` script ([e584343](https://github.com/wooorm/mdast-toc/commit/e584343))
92-
* Update dependencies ([6f2236c](https://github.com/wooorm/mdast-toc/commit/6f2236c))
88+
* Fix typo in CLIs help ([969cfe9](https://github.com/wooorm/remark-toc/commit/969cfe9))
89+
* Refactor code style in `cli.js` ([f92feca](https://github.com/wooorm/remark-toc/commit/f92feca))
90+
* Fix stringified output of lists for fixtures ([9ba50af](https://github.com/wooorm/remark-toc/commit/9ba50af))
91+
* Fix `test-api` script ([e584343](https://github.com/wooorm/remark-toc/commit/e584343))
92+
* Update dependencies ([6f2236c](https://github.com/wooorm/remark-toc/commit/6f2236c))

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @author Titus Wormer
33
* @copyright 2015 Titus Wormer
44
* @license MIT
5-
* @module mdast:toc
5+
* @module remark:toc
66
* @fileoverview Generate a Table of Contents (TOC) for Markdown files.
77
*/
88

@@ -12,7 +12,7 @@
1212
* Dependencies.
1313
*/
1414

15-
var slug = require('mdast-slug');
15+
var slug = require('remark-slug');
1616
var toString = require('mdast-util-to-string');
1717

1818
/*
@@ -296,13 +296,13 @@ function contents(map, tight) {
296296
*
297297
* @return {function(node)}
298298
*/
299-
function attacher(mdast, options) {
299+
function attacher(remark, options) {
300300
var settings = options || {};
301301
var heading = toExpression(settings.heading || DEFAULT_HEADING);
302302
var depth = settings.maxDepth || 6;
303303
var tight = settings.tight;
304304

305-
mdast.use(slug, settings.slug);
305+
remark.use(slug, settings.slug);
306306

307307
/**
308308
* Adds an example section based on a valid example

mdast-toc.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)