-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate mochajs.github.io into mocha; closes #2987 [ci skip]
- some jekyll tweaks were needed; we can no longer consume the `github-pages` gem apparently since they added support for themes - added `markdown-toc` dev dep to build the toc - added `buildDocs` and `serveDocs` scripts - miraculously avoided monkeying with the content itself Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
- Loading branch information
Showing
6 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ coverage/ | |
yarn.lock | ||
package-lock.json | ||
mocha.js | ||
docs/_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
# Added at 2017-12-05 23:01:55 -0800 by boneskull: | ||
gem "jekyll", "~> 3.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
GEM | ||
specs: | ||
addressable (2.5.2) | ||
public_suffix (>= 2.0.2, < 4.0) | ||
colorator (1.1.0) | ||
ffi (1.9.18) | ||
forwardable-extended (2.6.0) | ||
jekyll (3.6.2) | ||
addressable (~> 2.4) | ||
colorator (~> 1.0) | ||
jekyll-sass-converter (~> 1.0) | ||
jekyll-watch (~> 1.1) | ||
kramdown (~> 1.14) | ||
liquid (~> 4.0) | ||
mercenary (~> 0.3.3) | ||
pathutil (~> 0.9) | ||
rouge (>= 1.7, < 3) | ||
safe_yaml (~> 1.0) | ||
jekyll-sass-converter (1.5.0) | ||
sass (~> 3.4) | ||
jekyll-watch (1.5.1) | ||
listen (~> 3.0) | ||
kramdown (1.14.0) | ||
liquid (4.0.0) | ||
listen (3.0.8) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
mercenary (0.3.6) | ||
pathutil (0.16.0) | ||
forwardable-extended (~> 2.6) | ||
public_suffix (3.0.0) | ||
rb-fsevent (0.10.2) | ||
rb-inotify (0.9.10) | ||
ffi (>= 0.5.0, < 2) | ||
rouge (2.2.1) | ||
safe_yaml (1.0.4) | ||
sass (3.5.3) | ||
sass-listen (~> 4.0.0) | ||
sass-listen (4.0.0) | ||
rb-fsevent (~> 0.9, >= 0.9.4) | ||
rb-inotify (~> 0.9, >= 0.9.7) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
jekyll (~> 3.6) | ||
|
||
BUNDLED WITH | ||
1.16.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
parserOptions: | ||
ecmaVersion: 2017 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env node | ||
|
||
/** | ||
* The CLI included with markdown-toc doesn't support `bullets` | ||
* and `maxdepth` options, so that's why this exists. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const toc = require('markdown-toc'); | ||
const utils = require('markdown-toc/lib/utils'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const docsFilepath = path.join(__dirname, '..', 'docs', 'index.md'); | ||
|
||
console.log('Updating TOC...'); | ||
|
||
fs.createReadStream(docsFilepath) | ||
.on('error', err => { | ||
console.log(err); | ||
process.exit(1); | ||
}) | ||
.on('close', () => { | ||
console.log('Done.'); | ||
}) | ||
.pipe(utils.concat( | ||
input => fs.writeFileSync(docsFilepath, toc.insert(String(input), { | ||
bullets: '-', | ||
maxdepth: 2 | ||
})))); |