Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate gh-pages site into docs/; closes #2987 [ci skip]
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
boneskull committed Dec 6, 2017

Verified

This commit was signed with the committer’s verified signature.
boneskull Christopher Hiller
1 parent f26643b commit 43194b6
Showing 47 changed files with 5,729 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -15,3 +15,4 @@ coverage/
yarn.lock
package-lock.json
mocha.js
docs/_site
3 changes: 3 additions & 0 deletions Gemfile
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"
50 changes: 50 additions & 0 deletions Gemfile.lock
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
3 changes: 3 additions & 0 deletions docs/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
env:
browser: true
node: false
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mochajs.org
395 changes: 395 additions & 0 deletions docs/LICENSE-CC-BY-4.0

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# mochajs.org

*So you wanna build the site?*

[mochajs.org](https://mochajs.org) is built using [Jekyll](http://jekyllrb.com), the popular static site generator.

## Prerequisites

- Ruby
- RubyGems
- Bundler (`gem install bundler`)
- Node.js v4.0.0 or greater

## Development

1. Run `npm install` to get Node.js deps.
2. Run `bundle install` to install Jekyll and its dependencies. This may or may not require elevated privileges, depending on your system.
3. To serve the site and rebuild as changes are made, execute `npm run serveDocs`.
4. To rebuild the site *once*, execute `npm start buildDocs`.

### Notes

- The content lives in `docs/index.md`; everything else is markup, scripts, assets, etc.
- `docs/index.md` may be mutated upon build. If you update the table of contents, **you must commit `index.md`**; GitHub won't do it for you.
- `docs/_site/` is where the generated static site lives (and is what you see at [mochajs.org](https://mochajs.org)). It is *not* under version control.

## License

:copyright: 2016-2017 [JS Foundation](https://js.foundation) and contributors.

Content licensed [CC-BY-4.0](https://raw.githubusercontent.com/mochajs/mocha/master/docs/LICENSE-CC-BY-4.0).

Code licensed [MIT](https://raw.githubusercontent.com/mochajs/mocha/master/LICENSE-MIT).
8 changes: 8 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
url: https://mochajs.org
exclude:
- README.md
- .*
- LICENSE*
repository: mochajs/mocha
source: docs

6 changes: 6 additions & 0 deletions docs/_includes/backers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Backers

Find Mocha helpful? Become a [backer](https://opencollective.com/mochajs#support) and support Mocha with a monthly donation.

{: id="_backers" }
{% for i in (0..29) %}[![](//opencollective.com/mochajs/backer/{{ i }}/avatar){: onload="window.avatars.backerLoaded()" }](https://opencollective.com/mochajs/backer/{{ i }}/website){: target="_blank"} {% endfor %}
14 changes: 14 additions & 0 deletions docs/_includes/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<footer>
<span>
<a href="https://mochajs.org">mochajs.org</a> is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
<p><em>Last updated: {{ site.time | date: "%c" }}</em>
</span>
<script src="//cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.2/anchor.min.js"></script>
<script>
anchors.options = {
placement: 'left'
};
anchors.add('h2, h3');
</script>
</footer>
14 changes: 14 additions & 0 deletions docs/_includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"/>
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/pygments.css"/>
<link rel="shortcut icon" href="favicon.ico"/>

<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
<![endif]-->
<script src="js/ga.js"></script>
<script src="js/avatars.js"></script>
</head>
4 changes: 4 additions & 0 deletions docs/_includes/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<header id="_header">
<h1><a href="/"><img onload="window.document.getElementById('_header').classList.add('onload');" src="//cldup.com/xFVFxOioAU.svg"></a></h1>
<p id="tag"><em>simple</em>, <em>flexible</em>, <em>fun</em></p>
</header>
6 changes: 6 additions & 0 deletions docs/_includes/sponsors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Sponsors

Use Mocha at Work? Ask your manager or marketing team if they'd help [support](https://opencollective.com/mochajs#support) our project. Your company's logo will also be displayed on [npmjs.com](http://npmjs.com/package/mocha) and our [GitHub repository](https://github.com/mochajs/mocha#sponsors).

{: id="_sponsors" }
{% for i in (0..29) %}[![](//opencollective.com/mochajs/sponsor/{{ i }}/avatar){: onload="window.avatars.sponsorLoaded()" }](https://opencollective.com/mochajs/sponsor/{{ i }}/website){: target="_blank"} {% endfor %}
17 changes: 17 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">

{% include head.html %}

<body>

{% include header.html %}

<section id="content">
{{ content }}
</section>

{% include footer.html %}
</body>

</html>
59 changes: 59 additions & 0 deletions docs/css/pygments.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #bb8844 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #999999 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #bb8844 } /* Literal.String.Backtick */
.highlight .sc { color: #bb8844 } /* Literal.String.Char */
.highlight .sd { color: #bb8844 } /* Literal.String.Doc */
.highlight .s2 { color: #bb8844 } /* Literal.String.Double */
.highlight .se { color: #bb8844 } /* Literal.String.Escape */
.highlight .sh { color: #bb8844 } /* Literal.String.Heredoc */
.highlight .si { color: #bb8844 } /* Literal.String.Interpol */
.highlight .sx { color: #bb8844 } /* Literal.String.Other */
.highlight .sr { color: #808000 } /* Literal.String.Regex */
.highlight .s1 { color: #bb8844 } /* Literal.String.Single */
.highlight .ss { color: #bb8844 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
208 changes: 208 additions & 0 deletions docs/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
html {
font: 16px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
color: #2c2c2c;
border-top: 2px solid #ddd;
}

#content {
padding: 0 110px 60px 110px;
}

header {
padding: 140px 110px 0 110px;
}

h1 {
margin-left: -19px;
opacity: 0;
-webkit-transition: opacity 1s;
-moz-transition: opacity 1s;
-o-transition: opacity 1s;
transition: opacity 1s;
}

#_backers a, #_sponsors a {
opacity: 0;
-webkit-transition: opacity .3s;
-moz-transition: opacity .3s;
-o-transition: opacity .3s;
transition: opacity .3s;
}

#_backers a img, #_sponsors a img {
max-height: 64px;
}

.onload h1, #_backers.onload a, #_sponsors.onload a {
opacity: 1;
}

h2 {
margin-top: 80px;
font-weight: 400;
letter-spacing: 1px;
border-bottom: 1px solid #ddd;
text-transform: uppercase;
}

h3 {
font-weight: 200;
letter-spacing: 1px;
border-bottom: 1px solid #eee;
margin-top: 40px;
text-transform: uppercase;
}

h3 > code {
text-transform: none;
font-size: 14px;
}

#tag {
opacity: 0;
color: #c29d7f;
font-weight: 100;
font-size: 30px;
margin-top: -155px;
margin-left: 140px;
margin-bottom: 125px;
letter-spacing: 2px;
-webkit-transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
-moz-transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
-o-transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
transition: opacity 1s, margin-top 200ms, margin-bottom 200ms, margin-left 1s;
}

#tag em {
font-style: normal
}

.onload #tag {
opacity: 1;
margin-left: 185px;
}

#content > p:first-child {
font-size: 20px;
font-weight: 200;
letter-spacing: 1px;
}

a {
color: #8D6748;
}

a:hover {
color: #717171;
}

ul {
margin-top: 20px;
padding: 0 15px;
width: 100%;
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}

ul li {
margin-top: 5px;
margin-right: 60px;
list-style: none;
border-bottom: 1px solid #eee;
padding: 5px 0;
-webkit-column-break-inside: avoid;
-moz-column-break-inside: avoid;
column-break-inside: avoid;
}

ul::after {
content: '.';
height: 0;
display: block;
visibility: hidden;
clear: both;
}

code {
font: 14px monaco, monospace;
line-height: 1.8;
}

pre {
margin: 20px;
padding: 20px;
border: 1px solid #ddd;
border-bottom-color: #ccc;
background-color: #f3f3f3;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: inset 0 0 10px #ddd;
-moz-box-shadow: inset 0 0 10px #ddd;
box-shadow: inset 0 0 10px #ddd;
overflow-x: auto;
}

img {
margin: 30px;
padding: 1px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
-moz-box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
box-shadow: 0 3px 10px #dedede, 0 1px 5px #888;
max-width: 100%;
}

img[src*="opencollective.com/mochajs"], img[src*=badges], img[src*=".svg"] {
margin: 0;
box-shadow: none;
}

footer {
background-color: #eee;
width: 100%;
padding: 50px 0;
text-align: right;
border-top: 1px solid #ddd;
}

footer span {
display: block;
margin-right: 30px;
color: #888;
font-size: 0.8em;
}

@media all and (max-width: 850px) {
ul li {
width: 100%;
}
}

@media all and (max-width: 600px) {
#tag {
margin-top: 0;
margin-left: 0;
margin-bottom: 0;
}

.onload #tag {
margin-left: 0;
}
}

blockquote {
padding: 10px;
border-left: 1px solid #eee;
}
73 changes: 73 additions & 0 deletions docs/example/Array.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

describe('Array', function(){
describe('.push()', function(){
it('should append a value', function(){
var arr = [];
arr.push('foo');
arr.push('bar');
expect(arr[0]).to.equal('foo');
expect(arr[1]).to.equal('bar');
})

it('should return the length', function(){
var arr = [];
var n = arr.push('foo');
expect(n).to.equal(1);
var n = arr.push('bar');
expect(n).to.equal(2);
})

describe('with many arguments', function(){
it('should add the values', function(){
var arr = [];
arr.push('foo', 'bar');
expect(arr[0]).to.equal('foo');
expect(arr[1]).to.equal('bar');
})
})
})

describe('.unshift()', function(){
it('should prepend a value', function(){
var arr = [1,2,3];
arr.unshift('foo');
expect(arr[0]).to.equal('foo');
expect(arr[1]).to.equal(1);
})

it('should return the length', function(){
var arr = [];
var n = arr.unshift('foo');
expect(n).to.equal(1);
var n = arr.unshift('bar');
expect(n).to.equal(2);
})

describe('with many arguments', function(){
it('should add the values', function(){
var arr = [];
arr.unshift('foo', 'bar');
expect(arr[0]).to.equal('foo');
expect(arr[1]).to.equal('bar');
})
})
})

describe('.pop()', function(){
it('should remove and return the last value', function(){
var arr = [1,2,3];
expect(arr.pop()).to.equal(3);
expect(arr.pop()).to.equal(2);
expect(arr).to.have.length(1);
})
})

describe('.shift()', function(){
it('should remove and return the first value', function(){
var arr = [1,2,3];
expect(arr.shift()).to.equal(1);
expect(arr.shift()).to.equal(2);
expect(arr).to.have.length(1);
})
})
})
33 changes: 33 additions & 0 deletions docs/example/async-dump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';

const {createHook} = require('async_hooks');
const {stackTraceFilter} = require('mocha/lib/utils');
const allResources = new Map();
const resourceActivity = new Set();

const filterStack = stackTraceFilter();

const hook = createHook({
init(asyncId, type, triggerAsyncId) {
allResources.set(asyncId, {type, triggerAsyncId, stack: (new Error()).stack});
},
before(asyncId) {
resourceActivity.add(asyncId);
},
after(asyncId) {
resourceActivity.delete(asyncId);
},
destroy(asyncId) {
allResources.delete(asyncId);
}
}).enable();

global.asyncDump = module.exports = () => {
hook.disable();
console.error('STUFF STILL IN THE EVENT LOOP:')
allResources.forEach(value=> {
console.error(`Type: ${value.type}`);
console.error(filterStack(value.stack));
console.error('\n');
});
};
3,403 changes: 3,403 additions & 0 deletions docs/example/chai.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/example/debug-hanging-mocha.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

const net = require('net');
const assert = require('assert');

describe('how to debug Mocha when it hangs', function () {
before(function (done) {
const server = net.createServer();
server.listen(10101, done);
});

after(function () {
global.asyncDump();
});

it('should complete, but Mocha should not exit', function(done) {
const sock = net.createConnection(10101, () => {
assert.deepEqual(sock.address().family, 'IPv4');
done();
});
});
});
20 changes: 20 additions & 0 deletions docs/example/tests.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mocha</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/4.0.1/mocha.min.css">
<link rel="shortcut icon" href="../favicon.ico">
</head>
<body>
<div id="mocha"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/4.0.1/mocha.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.1.2/chai.min.js"></script>
<script>mocha.setup('bdd')</script>
<script>expect = chai.expect</script>
<script src="Array.js"></script>
<script>
mocha.run();
</script>
</body>
</html>
Binary file added docs/favicon.ico
Binary file not shown.
Binary file added docs/images/emacs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/jetbrains-plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-doc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-dot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-html.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-json-stream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-json.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-landing-fail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-landing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-min.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-nyan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-spec-duration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-spec-fail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-spec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-string-diffs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/reporter-tap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wallaby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,296 changes: 1,296 additions & 0 deletions docs/index.md

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions docs/js/avatars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function () {
'use strict';
// dumb thing that helps with animation of avatars
var avatars = window.avatars = function (type) {
return function avatarLoaded () {
avatars[type] = typeof avatars[type] === 'number' ? avatars[type] + 1 : 1;
if (avatars[type] === 30) {
document.getElementById(type).classList.add('onload');
}
};
};

avatars.backerLoaded = avatars('_backers');
avatars.sponsorLoaded = avatars('_sponsors');
}());
7 changes: 7 additions & 0 deletions docs/js/ga.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-65024936-1', 'auto');
ga('send', 'pageview');
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -303,7 +303,10 @@
"lint": "eslint . bin/*",
"test": "make clean && make test",
"prepublishOnly": "npm test && make clean && make mocha.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"prebuildDocs": "node scripts/pre-build-docs.js",
"buildDocs": "bundle exec jekyll build --source docs --destination docs/_site --layouts docs/_layouts --safe --drafts",
"serveDocs": "bundle exec jekyll serve --config docs/_config.yml --safe --drafts --watch"
},
"dependencies": {
"browser-stdout": "1.3.0",
@@ -340,6 +343,7 @@
"karma-mocha-reporter": "^2.2.4",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sauce-launcher": "^1.2.0",
"markdown-toc": "^1.2.0",
"nyc": "^11.2.1",
"rimraf": "^2.5.2",
"through2": "^2.0.1",
2 changes: 2 additions & 0 deletions scripts/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
parserOptions:
ecmaVersion: 2017
31 changes: 31 additions & 0 deletions scripts/pre-build-docs.js
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
}))));

0 comments on commit 43194b6

Please sign in to comment.