diff --git a/.editorconfig b/.editorconfig
index a4e8f29c2..7352e894d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -3,8 +3,13 @@ root = true
[*]
charset = utf-8
-[*.js]
+[*.{js,json,yml,html,md}]
indent_style = tab
+tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
+
+[{package.json,.travis.yml}]
+indent_style = space
+indent_size = 2
diff --git a/.eslintignore b/.eslintignore
index 62117a948..72bec5e8d 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,7 +1,7 @@
-.vscode/
-coverage/
-docs/lib/
-examples/
+/.vscode
+/coverage
+/docs/lib
+/examples
/mithril.js
/mithril.min.js
-node_modules/
+/node_modules
diff --git a/.gitignore b/.gitignore
index 13f89651b..aa4d28f32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,5 +6,6 @@ npm-debug.log
.DS_Store
.eslintcache
-# These are artifacts from Travis' deploy scripts
+# These are artifacts from various scripts
/dist
+/archive
diff --git a/.travis.yml b/.travis.yml
index 181b73f3c..b04c360d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,12 +16,6 @@ install:
# This is to prevent lint-staged/prettier from running on the bundles
- npm rm husky
-# Build bundles (so they're always up to date)
-before_script:
-- npm run build-browser
-# Pass -save so it'll update the readme as well
-- npm run build-min -- -save
-
# Run tests, lint, and then check for perf regressions
script:
- npm test
@@ -90,12 +84,13 @@ deploy:
tags: true
repo: MithrilJS/mithril.js
- - provider: npm
- skip_cleanup: true
- email: me@isiahmeadows.com
- api_key:
- secure: "uPLbeJTalA/b38srb1VuWnD3eOgeKTkXf8VVUasUXIqc2xub4DSkFm1IVKSVd/rzP7EeO7+gRUs2UteNKlpZJl226IS5mFPSVtC7ViW46WSpYT0wlMsc7hrubMBGTx3/XYpPwtmMlTIGs5ICT7YkGAuju/6i79LDAB+gbnEY8Bc="
- on:
- tags: true
- repo: MithrilJS/mithril.js
- condition: "$TRAVIS_TAG != *-*"
+ # Skip until I can figure out what's going on with docs + version deployment
+ # - provider: npm
+ # skip_cleanup: true
+ # email: me@isiahmeadows.com
+ # api_key:
+ # secure: "uPLbeJTalA/b38srb1VuWnD3eOgeKTkXf8VVUasUXIqc2xub4DSkFm1IVKSVd/rzP7EeO7+gRUs2UteNKlpZJl226IS5mFPSVtC7ViW46WSpYT0wlMsc7hrubMBGTx3/XYpPwtmMlTIGs5ICT7YkGAuju/6i79LDAB+gbnEY8Bc="
+ # on:
+ # tags: true
+ # repo: MithrilJS/mithril.js
+ # condition: "$TRAVIS_TAG != *-*"
diff --git a/docs/components.md b/docs/components.md
index d564c42f5..88bd707ac 100644
--- a/docs/components.md
+++ b/docs/components.md
@@ -466,7 +466,7 @@ var Modal = {
If you do it like above, you could run into issues when using it:
-```js
+```javascript
var MyModal = {
view: function() {
return m(Modal, {
@@ -483,7 +483,7 @@ var MyModal = {
Instead, you should forward *single* attributes into vnodes:
-```js
+```javascript
// PREFER
var Modal = {
// ...
diff --git a/docs/generate.js b/docs/generate.js
deleted file mode 100644
index 5650ae9da..000000000
--- a/docs/generate.js
+++ /dev/null
@@ -1,71 +0,0 @@
-"use strict"
-
-var fs = require("fs")
-var path = require("path")
-var marked = require("marked")
-var layout = fs.readFileSync("./docs/layout.html", "utf-8")
-var version = JSON.parse(fs.readFileSync("./package.json", "utf-8")).version
-try {fs.mkdirSync("./dist")} catch (e) {/* ignore */}
-try {fs.mkdirSync("./dist/archive")} catch (e) {/* ignore */}
-try {fs.mkdirSync("./dist/archive/v" + version)} catch (e) {/* ignore */}
-
-var guides = fs.readFileSync("docs/nav-guides.md", "utf-8")
-var methods = fs.readFileSync("docs/nav-methods.md", "utf-8")
-
-generate("docs")
-
-function generate(pathname) {
- if (fs.lstatSync(pathname).isDirectory()) {
- fs.readdirSync(pathname).forEach(function(filename) {
- generate(pathname + "/" + filename)
- })
- }
- else if (!pathname.match(/tutorials|archive|nav-/)) {
- if (pathname.match(/\.md$/)) {
- var outputFilename = pathname.replace(/\.md$/, ".html")
- var markdown = fs.readFileSync(pathname, "utf-8")
- var anchors = {}
- var fixed = markdown
- .replace(/`((?:\S| -> |, )+)(\|)(\S+)`/gim, function(match, a, b, c) { // fix pipes in code tags
- return "" + (a + b + c).replace(/\|/g, "|") + "
"
- })
- .replace(/(^# .+?(?:\r?\n){2,}?)(?:(-(?:.|\r|\n)+?)((?:\r?\n){2,})|)/m, function(match, title, nav) { // inject menu
- var file = path.basename(pathname)
- var link = new RegExp("([ \t]*)(- )(\\[.+?\\]\\(" + file + "\\))")
- var replace = function(match, space, li, link) {
- return space + li + "**" + link + "**" + (nav ? "\n" + nav.replace(/(^|\n)/g, "$1\t" + space) : "")
- }
- var modified = guides.match(link) ? guides.replace(link, replace) : methods.replace(link, replace)
- return title + modified + "\n\n"
- })
- .replace(/(\]\([^\)]+)(\.md)/gim, function(match, path, extension) {
- return path + (path.match(/http/) ? extension : ".html")
- }) // fix links
- var markedHtml = marked(fixed)
- .replace(/(\W)Array<([^/<]+?)>/gim, "$1Array<$2>") // Fix type signatures containing Array<...>
- var title = fixed.match(/^#([^\n\r]+)/i) || []
- var html = layout
- .replace(/
Mithril\.js<\/title>/, "" + title[1] + " - Mithril.js ")
- .replace(/\[version\]/g, version) // update version
- .replace(/\[body\]/, markedHtml)
- .replace(/(.+?)<\/h.>/gim, function(match, n, id, text) { // fix anchors
- var anchor = text.toLowerCase().replace(/<(\/?)code>/g, "").replace(/.+?<\/a>/g, "").replace(/\.|\[|\]|"|\/|\(|\)/g, "").replace(/\s/g, "-");
-
- if(anchor in anchors) {
- anchor += ++anchors[anchor]
- } else {
- anchors[anchor] = 0;
- }
-
- return `${text} `;
- })
- fs.writeFileSync("./dist/archive/v" + version + "/" + outputFilename.replace(/^docs\//, ""), html, "utf-8")
- fs.writeFileSync("./dist/" + outputFilename.replace(/^docs\//, ""), html, "utf-8")
- }
- else if (!pathname.match(/lint|generate/)) {
- var encoding = (/\.(ico|png)$/i).test(path.extname(pathname)) ? "binary" : "utf-8";
- fs.writeFileSync("./dist/archive/v" + version + "/" + pathname.replace(/^docs\//, ""), fs.readFileSync(pathname, encoding), encoding)
- fs.writeFileSync("./dist/" + pathname.replace(/^docs\//, ""), fs.readFileSync(pathname, encoding), encoding)
- }
- }
-}
diff --git a/docs/hyperscript.md b/docs/hyperscript.md
index 731b5073d..2c70de2b0 100644
--- a/docs/hyperscript.md
+++ b/docs/hyperscript.md
@@ -215,7 +215,7 @@ m("a-scene", [
])
```
-And yes, this translates to both attributes and properties, and it works just like they would in the DOM. Using [Brick's `brick-deck`](https://brick.mozilla.io/docs/brick-deck) as an example, they have a `selected-index` attribute with a corresponding `selectedIndex` getter/setter property.
+And yes, this translates to both attributes and properties, and it works just like they would in the DOM. Using [Brick's `brick-deck`](http://brick.mozilla.io/docs/brick-deck) as an example, they have a `selected-index` attribute with a corresponding `selectedIndex` getter/setter property.
```javascript
m("brick-deck[selected-index=0]", [/* ... */]) // lowercase
diff --git a/docs/installation.md b/docs/installation.md
index 7ef19766b..16d70d650 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -51,7 +51,7 @@ $ npm install webpack webpack-cli --save-dev
```
3. Add a "start" entry to the scripts section in `package.json`.
-```js
+```javascript
{
// ...
"scripts": {
@@ -61,7 +61,7 @@ $ npm install webpack webpack-cli --save-dev
```
4. Create `src/index.js` file.
-```js
+```javascript
import m from "mithril";
m.render(document.body, "hello world");
```
@@ -113,7 +113,7 @@ m.render(document.body, "hello world")
Modularization is the practice of separating the code into files. Doing so makes it easier to find code, understand what code relies on what code, and test.
-CommonJS is a de-facto standard for modularizing JavaScript code, and it's used by Node.js, as well as tools like [Browserify](https://browserify.org/) and [Webpack](https://webpack.js.org/). It's a robust, battle-tested precursor to ES6 modules. Although the syntax for ES6 modules is specified in Ecmascript 6, the actual module loading mechanism is not. If you wish to use ES6 modules despite the non-standardized status of module loading, you can use tools like [Rollup](https://rollupjs.org/) or [Babel](https://babeljs.io/).
+CommonJS is a de-facto standard for modularizing JavaScript code, and it's used by Node.js, as well as tools like [Browserify](http://browserify.org/) and [Webpack](https://webpack.js.org/). It's a robust, battle-tested precursor to ES6 modules. Although the syntax for ES6 modules is specified in Ecmascript 6, the actual module loading mechanism is not. If you wish to use ES6 modules despite the non-standardized status of module loading, you can use tools like [Rollup](https://rollupjs.org/) or [Babel](https://babeljs.io/).
Most browser today do not natively support modularization systems (CommonJS or ES6), so modularized code must be bundled into a single JavaScript file before running in a client-side application.
@@ -125,7 +125,7 @@ npm install webpack webpack-cli --save-dev
Open the `package.json` that you created earlier, and add an entry to the `scripts` section:
-```
+```json
{
"name": "my-project",
"scripts": {
@@ -199,7 +199,7 @@ If you open bin/app.js, you'll notice that the Webpack bundle is not minified, s
You can use hooks in your production environment to run the production build script automatically. Here's an example for [Heroku](https://www.heroku.com/):
-```
+```json
{
"name": "my-project",
"scripts": {
diff --git a/docs/jsx.md b/docs/jsx.md
index 0142047b9..9806411b8 100644
--- a/docs/jsx.md
+++ b/docs/jsx.md
@@ -193,7 +193,7 @@ JSX and hyperscript are two different syntaxes you can use for specifying vnodes
You can see the tradeoffs come into play in more complex trees. For instance, consider this hyperscript tree, adapted from a real-world project by [@isiahmeadows](https://github.com/isiahmeadows/) with some alterations for clarity and readability:
-```js
+```javascript
function SummaryView() {
let tag, posts
diff --git a/docs/lint.js b/docs/lint.js
deleted file mode 100644
index 356eb76a9..000000000
--- a/docs/lint.js
+++ /dev/null
@@ -1,186 +0,0 @@
-#!/usr/bin/env node
-"use strict"
-
-var fs = require("fs")
-var path = require("path")
-var http = require("http")
-var url = require("url")
-
-//lint rules
-function lint(file, data) {
- ensureCodeIsHighlightable(file, data)
- ensureCodeIsSyntaticallyValid(file, data)
- ensureCodeIsRunnable(file, data)
- ensureCommentStyle(file, data)
- ensureLinkIsValid(file, data)
-}
-
-function ensureCodeIsHighlightable(file, data) {
- var codeBlocks = data.match(/```(.|\n|\r)*?```/gim) || []
- codeBlocks.forEach(function(block) {
- block = block.slice(3, -3)
- if (block.indexOf("javascript") !== 0) {
- try {if (new Function(block)) console.log(file + " - javascript block missing language tag after triple backtick\n\n" + block + "\n\n---\n\n")}
- catch (e) {/*not a js block, ignore*/}
- }
- })
-}
-
-function ensureCodeIsSyntaticallyValid(file, data) {
- var codeBlocks = data.match(/```javascript(.|\n|\r)*?```/gim) || []
- codeBlocks.forEach(function(block) {
- block = block.slice(13, -3)
- try {new Function(block)}
- catch (e) {console.log(file + " - javascript block has wrong syntax\n\n" + e.message + "\n\n" + block + "\n\n---\n\n")}
- })
-}
-
-function ensureCodeIsRunnable(file, data) {
- var codeBlocks = data.match(/```javascript(.|\n|\r)*?```/gim) || []
- var code = codeBlocks.map(function(block) {return block.slice(13, -3)}).join(";")
-
- //stubs
- var silentConsole = {log: function() {}}
- var fetch = function() {
- return Promise.resolve({
- json: function() {}
- })
- }
-
- try {
- initMocks()
- var module = {exports: {}}
- new Function("console,fetch,module,require", code).call(this, silentConsole, fetch, module, function(dep) {
- if (dep.indexOf("./mycomponent") === 0) return {view: function() {}}
- if (dep.indexOf("mithril/ospec/ospec") === 0) return global.o
- if (dep.indexOf("mithril/stream") === 0) return global.stream
- if (dep === "mithril") return global.m
-
- if (dep === "../model/User") return {
- list: [],
- current: {},
- loadList: function() {
- return Promise.resolve({data: []})
- },
- load: function() {
- return Promise.resolve({firstName: "", lastName: ""})
- },
- save: function() {
- return Promise.resolve()
- },
- }
- if (dep === "./view/UserList") return {view: function() {}}
- if (dep === "./view/UserForm") return {view: function() {}}
- if (dep === "./view/Layout") return {view: function() {}}
- })
- }
- catch (e) {console.log(file + " - javascript code cannot run\n\n" + e.stack + "\n\n" + code + "\n\n---\n\n")}
-}
-
-function ensureCommentStyle(file, data) {
- var codeBlocks = data.match(/```javascript(.|\n|\r)*?```/gim) || []
- codeBlocks.forEach(function(block) {
- block = block.slice(13, -3)
- if (block.match(/(^|\s)\/\/[\S]/)) console.log(file + " - comment missing space\n\n" + block + "\n\n---\n\n")
- })
-}
-
-function ensureLinkIsValid(file, data) {
- var links = data.match(/\]\(([^\)]+?)\)/gim) || []
- links.forEach(function(match) {
- var link = match.slice(2, -1)
- var path = (link.match(/[\w-#]+\.md/) || [])[0]
- if (link.match(/http/)) {
- var u = url.parse(link)
- http.request({method: "HEAD", host: u.host, path: u.pathname, port: 80}).on("error", function() {
- console.log(file + " - broken external link: " + link)
- })
- }
- else if (path && !fs.existsSync("docs/" + path)) console.log(file + " - broken link: " + link)
- })
-}
-
-function initMocks() {
- /* eslint-disable global-require */
- global.window = require("../test-utils/browserMock")()
- global.document = window.document
- global.m = require("../index")
- global.o = require("../ospec/ospec")
- global.stream = require("../stream")
- global.alert = function() {}
- /* eslint-enable global-require */
-
- //routes consumed by request.md
- global.window.$defineRoutes({
- "GET /api/v1/users": function() {
- return {status: 200, responseText: JSON.stringify([{name: ""}])}
- },
- "GET /api/v1/users/search": function() {
- return {status: 200, responseText: JSON.stringify([{id: 1, name: ""}])}
- },
- "GET /api/v1/users/1/projects": function() {
- return {status: 200, responseText: JSON.stringify([{id: 1, name: ""}])}
- },
- "GET /api/v1/todos": function() {
- return {status: 200, responseText: JSON.stringify([])}
- },
- "PUT /api/v1/users/1": function(request) {
- return {status: 200, responseText: request.query.callback ? request.query.callback + "([])" : "[]"}
- },
- "POST /api/v1/upload": function() {
- return {status: 200, responseText: JSON.stringify([])}
- },
- "GET /files/icon.svg": function() {
- return {status: 200, responseText: " "}
- },
- "GET /files/data.csv": function() {
- return {status: 200, responseText: "a,b,c"}
- },
- "GET /api/v1/users/123": function() {
- return {status: 200, responseText: JSON.stringify({id: 123})}
- },
- "GET /api/v1/users/foo:bar": function() {
- return {status: 200, responseText: JSON.stringify({id: 123})}
- },
- "GET /files/image.svg": function() {
- return {status: 200, responseText: " "}
- },
- })
-}
-
-//runner
-function traverseDirectory(pathname, callback) {
- pathname = pathname.replace(/\\/g, "/")
- return new Promise(function(resolve, reject) {
- fs.lstat(pathname, function(err, stat) {
- if (err) reject(err)
- if (stat.isDirectory()) {
- fs.readdir(pathname, function(err, pathnames) {
- if (err) reject(err)
- var promises = []
- for (var i = 0; i < pathnames.length; i++) {
- pathnames[i] = path.join(pathname, pathnames[i])
- promises.push(traverseDirectory(pathnames[i], callback))
- }
- callback(pathname, stat, pathnames)
- resolve(Promise.all(promises))
- })
- }
- else {
- callback(pathname, stat)
- resolve(pathname)
- }
- })
- })
-}
-
-//run
-traverseDirectory("./docs", function(pathname) {
- if (pathname.indexOf(".md") > -1 && !pathname.match(/change-log|migration-|node_modules/)) {
- fs.readFile(pathname, "utf8", function(err, data) {
- if (err) console.log(err)
- else lint(pathname, data)
- })
- }
-})
- .then(process.exit)
diff --git a/docs/migration-v02x.md b/docs/migration-v02x.md
index ea441b6c0..5f52a2809 100644
--- a/docs/migration-v02x.md
+++ b/docs/migration-v02x.md
@@ -349,7 +349,7 @@ m("div", m(Component, "value", function(key) { return "child" }))
In v0.2.x, the children of DOM nodes were represented literally with no normalization aside from using the children directly if only a single array child is present. It returned a structure more like this, with the strings represented literally.
-```js
+```javascript
m("div", "value", ["nested"])
// Becomes:
@@ -365,7 +365,7 @@ m("div", "value", ["nested"])
In v2.x, children of DOM vnodes are normalized to objects of a single consistent structure.
-```js
+```javascript
m("div", "value", ["nested"])
// Becomes roughly:
@@ -383,7 +383,7 @@ m("div", "value", ["nested"])
If only a single text child is present on a DOM vnode, it instead sets `text` to that value.
-```js
+```javascript
m("div", "value")
// Becomes roughly:
diff --git a/docs/route.md b/docs/route.md
index 0be4f415e..823ca82e2 100644
--- a/docs/route.md
+++ b/docs/route.md
@@ -177,7 +177,7 @@ m(m.route.Link, {
}, "link name")
```
-This supports full accessibility for both `a` and `button`, via a `disabled` attribute. This ensures [no `href` attribute or `onclick` handler is set](https://css-tricks.com/how-to-disable-links/) and that an `"aria-disabled": "true"` attribute *is* set. If you are passing an `onclick` handler already, that's dropped. (You can work around this by adding it directly in a [lifecycle hook](lifecycle.md).) The `disabled` attribute is itself proxied to the element or component, so you can disable routed ``s and the like.
+This supports full accessibility for both `a` and `button`, via a `disabled` attribute. This ensures [no `href` attribute or `onclick` handler is set](https://css-tricks.com/how-to-disable-links/) and that an `"aria-disabled": "true"` attribute *is* set. If you are passing an `onclick` handler already, that's dropped. (You can work around this by adding it directly in a [lifecycle hook](lifecycle-methods.md).) The `disabled` attribute is itself proxied to the element or component, so you can disable routed ``s and the like.
```javascript
// This does the right thing and the accessible thing for you.
@@ -241,7 +241,7 @@ As a rule of thumb, RouteResolvers should be in the same file as the `m.route` c
When using components, you could think of them as special sugar for this route resolver, assuming your component is `Home`:
-```js
+```javascript
var routeResolver = {
onmatch: function() { return Home },
render: function(vnode) { return [vnode] },
@@ -803,16 +803,13 @@ m.route(document.body, "/", {
However, realistically, in order for that to work on a production scale, it would be necessary to bundle all of the dependencies for the `Home.js` module into the file that is ultimately served by the server.
-Fortunately, there are a number of tools that facilitate the task of bundling modules for lazy loading. Here's an example using [webpack's code splitting system](https://webpack.github.io/docs/code-splitting.html):
+Fortunately, there are a number of tools that facilitate the task of bundling modules for lazy loading. Here's an example using [native dynamic `import(...)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import), supported by many bundlers:
```javascript
m.route(document.body, "/", {
"/": {
onmatch: function() {
- // using Webpack async code splitting
- return new Promise(function(resolve) {
- require(['./Home.js'], resolve)
- })
+ return import('./Home.js')
},
},
})
diff --git a/docs/testing.md b/docs/testing.md
index 90ca88766..d4e5bedb7 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -150,7 +150,7 @@ module.exports = MyComponent
You could easily create a few unit tests for that.
-```js
+```javascript
var mq = require("mithril-query")
var MyComponent = require("./MyComponent")
diff --git a/package-lock.json b/package-lock.json
index 32cd3d572..93abe32ff 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -30,6 +30,12 @@
"js-tokens": "^4.0.0"
}
},
+ "@babel/parser": {
+ "version": "7.5.5",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.5.5.tgz",
+ "integrity": "sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g==",
+ "dev": true
+ },
"@babel/runtime": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz",
@@ -66,6 +72,14 @@
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
},
"log-symbols": {
@@ -186,6 +200,30 @@
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
"dev": true
},
+ "array-differ": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
+ "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=",
+ "dev": true
+ },
+ "array-filter": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz",
+ "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=",
+ "dev": true
+ },
+ "array-map": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz",
+ "integrity": "sha1-iKK6tz0c97zVwbEYoAP2b2ZfpmI=",
+ "dev": true
+ },
+ "array-reduce": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz",
+ "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=",
+ "dev": true
+ },
"array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
@@ -213,6 +251,27 @@
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
},
+ "asap": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
+ "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
+ "dev": true
+ },
+ "asn1": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
+ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+ "dev": true,
+ "requires": {
+ "safer-buffer": "~2.1.0"
+ }
+ },
+ "assert-plus": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
+ },
"assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
@@ -240,12 +299,30 @@
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
"dev": true
},
+ "asynckit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+ "dev": true
+ },
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"dev": true
},
+ "aws-sign2": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
+ "dev": true
+ },
+ "aws4": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
+ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
+ "dev": true
+ },
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
@@ -313,6 +390,15 @@
}
}
},
+ "bcrypt-pbkdf": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+ "dev": true,
+ "requires": {
+ "tweetnacl": "^0.14.3"
+ }
+ },
"benchmark": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
@@ -414,6 +500,22 @@
"integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==",
"dev": true
},
+ "camel-case": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
+ "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=",
+ "dev": true,
+ "requires": {
+ "no-case": "^2.2.0",
+ "upper-case": "^1.1.1"
+ }
+ },
+ "caseless": {
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+ "dev": true
+ },
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
@@ -434,6 +536,12 @@
"color-convert": "^1.9.0"
}
},
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
@@ -501,6 +609,23 @@
}
}
},
+ "clean-css": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz",
+ "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==",
+ "dev": true,
+ "requires": {
+ "source-map": "~0.6.0"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ }
+ }
+ },
"cli-cursor": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
@@ -557,6 +682,15 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
+ "combined-stream": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
+ "requires": {
+ "delayed-stream": "~1.0.0"
+ }
+ },
"commander": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
@@ -612,6 +746,15 @@
"which": "^1.2.9"
}
},
+ "dashdash": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0"
+ }
+ },
"date-fns": {
"version": "1.30.1",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz",
@@ -645,6 +788,15 @@
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true
},
+ "define-properties": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+ "dev": true,
+ "requires": {
+ "object-keys": "^1.0.12"
+ }
+ },
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@@ -706,6 +858,12 @@
"rimraf": "^2.2.8"
}
},
+ "delayed-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "dev": true
+ },
"doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
@@ -715,6 +873,16 @@
"esutils": "^2.0.2"
}
},
+ "ecc-jsbn": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "dev": true,
+ "requires": {
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.1.0"
+ }
+ },
"elegant-spinner": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz",
@@ -727,6 +895,12 @@
"integrity": "sha512-kUlSC06PVvvjlMRpNIl3kR1NRXLEe86VQ7N0bQeaCZb2g+InShCeHQp/JvyYNTugMnRN2NvJhHlc3q12MWbbpg==",
"dev": true
},
+ "emitter-mixin": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/emitter-mixin/-/emitter-mixin-0.0.3.tgz",
+ "integrity": "sha1-WUjLKG8uSO3DslGnz8H3iDOW1lw=",
+ "dev": true
+ },
"end-of-stream": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
@@ -736,6 +910,15 @@
"once": "^1.4.0"
}
},
+ "errno": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+ "dev": true,
+ "requires": {
+ "prr": "~1.0.1"
+ }
+ },
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@@ -745,10 +928,35 @@
"is-arrayish": "^0.2.1"
}
},
+ "es-abstract": {
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
+ "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.0",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "is-callable": "^1.1.4",
+ "is-regex": "^1.0.4",
+ "object-keys": "^1.0.12"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
+ "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
+ "dev": true,
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
"escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"dev": true
},
"escodegen": {
@@ -1009,6 +1217,12 @@
}
}
},
+ "extend": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+ "dev": true
+ },
"extend-shallow": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
@@ -1112,6 +1326,12 @@
}
}
},
+ "extsprintf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "dev": true
+ },
"fast-deep-equal": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
@@ -1138,6 +1358,14 @@
"requires": {
"escape-string-regexp": "^1.0.5",
"object-assign": "^4.1.0"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
},
"file-entry-cache": {
@@ -1230,6 +1458,23 @@
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
"dev": true
},
+ "forever-agent": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "dev": true
+ },
+ "form-data": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+ "dev": true,
+ "requires": {
+ "asynckit": "^0.4.0",
+ "combined-stream": "^1.0.6",
+ "mime-types": "^2.1.12"
+ }
+ },
"fragment-cache": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
@@ -1811,6 +2056,12 @@
}
}
},
+ "function-bind": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
+ "dev": true
+ },
"functional-red-black-tree": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
@@ -1849,6 +2100,15 @@
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
"dev": true
},
+ "getpass": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0"
+ }
+ },
"gh-pages": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.0.1.tgz",
@@ -1866,9 +2126,9 @@
}
},
"glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
+ "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -1953,6 +2213,31 @@
}
}
},
+ "har-schema": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
+ "dev": true
+ },
+ "har-validator": {
+ "version": "5.1.3",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
+ "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.5.5",
+ "har-schema": "^2.0.0"
+ }
+ },
+ "has": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1"
+ }
+ },
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
@@ -1968,6 +2253,12 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
+ "has-symbols": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
+ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
+ "dev": true
+ },
"has-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
@@ -2000,6 +2291,70 @@
}
}
},
+ "he": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+ "dev": true
+ },
+ "hosted-git-info": {
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
+ "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
+ "dev": true
+ },
+ "html-minifier": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
+ "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==",
+ "dev": true,
+ "requires": {
+ "camel-case": "^3.0.0",
+ "clean-css": "^4.2.1",
+ "commander": "^2.19.0",
+ "he": "^1.2.0",
+ "param-case": "^2.1.1",
+ "relateurl": "^0.2.7",
+ "uglify-js": "^3.5.1"
+ },
+ "dependencies": {
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
+ "uglify-js": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
+ "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
+ "dev": true,
+ "requires": {
+ "commander": "~2.20.0",
+ "source-map": "~0.6.1"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "2.20.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
+ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
+ "dev": true
+ }
+ }
+ }
+ }
+ },
+ "http-signature": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0",
+ "jsprim": "^1.2.2",
+ "sshpk": "^1.7.0"
+ }
+ },
"humanize-url": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz",
@@ -2114,6 +2469,14 @@
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
},
"is-fullwidth-code-point": {
@@ -2192,6 +2555,12 @@
"integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=",
"dev": true
},
+ "is-callable": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
+ "dev": true
+ },
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@@ -2201,6 +2570,12 @@
"kind-of": "^3.0.2"
}
},
+ "is-date-object": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
+ "dev": true
+ },
"is-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
@@ -2325,6 +2700,15 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
"dev": true
},
+ "is-regex": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.1"
+ }
+ },
"is-regexp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
@@ -2337,6 +2721,21 @@
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
"dev": true
},
+ "is-symbol": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
+ "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
+ "dev": true,
+ "requires": {
+ "has-symbols": "^1.0.0"
+ }
+ },
+ "is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "dev": true
+ },
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
@@ -2361,6 +2760,12 @@
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
"dev": true
},
+ "isstream": {
+ "version": "0.1.2",
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "dev": true
+ },
"istanbul": {
"version": "0.4.5",
"resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz",
@@ -2457,12 +2862,24 @@
}
}
},
+ "jsbn": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+ "dev": true
+ },
"json-parse-better-errors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
+ "json-schema": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+ "dev": true
+ },
"json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
@@ -2475,6 +2892,12 @@
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
"dev": true
},
+ "json-stringify-safe": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+ "dev": true
+ },
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
@@ -2484,6 +2907,30 @@
"graceful-fs": "^4.1.6"
}
},
+ "jsonify": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
+ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
+ "dev": true
+ },
+ "jsprim": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+ "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "1.0.0",
+ "extsprintf": "1.3.0",
+ "json-schema": "0.2.3",
+ "verror": "1.10.0"
+ }
+ },
+ "junk": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/junk/-/junk-1.0.3.tgz",
+ "integrity": "sha1-h75jSIZJy9ym9Tqzm+yczSNH9ZI=",
+ "dev": true
+ },
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
@@ -2611,6 +3058,14 @@
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
},
"log-symbols": {
@@ -2643,10 +3098,30 @@
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
}
}
},
+ "load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "dev": true,
+ "requires": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ }
+ },
"locater": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/locater/-/locater-1.3.0.tgz",
@@ -2685,6 +3160,12 @@
"wrap-ansi": "^3.0.1"
}
},
+ "lower-case": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
+ "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=",
+ "dev": true
+ },
"map-cache": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
@@ -2701,9 +3182,9 @@
}
},
"marked": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/marked/-/marked-0.6.2.tgz",
- "integrity": "sha512-LqxwVH3P/rqKX4EKGz7+c2G9r98WeM/SW34ybhgNGhUQNKtf1GmmSkJ6cDGJ/t6tiyae49qRkpyTw2B9HOrgUA==",
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz",
+ "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==",
"dev": true
},
"matcher": {
@@ -2713,8 +3194,34 @@
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.4"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
+ }
+ },
+ "maximatch": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/maximatch/-/maximatch-0.1.0.tgz",
+ "integrity": "sha1-hs2NawTJ8wfAWmuUGZBtA2D7E6I=",
+ "dev": true,
+ "requires": {
+ "array-differ": "^1.0.0",
+ "array-union": "^1.0.1",
+ "arrify": "^1.0.0",
+ "minimatch": "^3.0.0"
}
},
+ "memorystream": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
+ "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
+ "dev": true
+ },
"micromatch": {
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
@@ -2744,6 +3251,21 @@
}
}
},
+ "mime-db": {
+ "version": "1.40.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
+ "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
+ "dev": true
+ },
+ "mime-types": {
+ "version": "2.1.24",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
+ "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
+ "dev": true,
+ "requires": {
+ "mime-db": "1.40.0"
+ }
+ },
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
@@ -2760,9 +3282,9 @@
}
},
"minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
"mixin-deep": {
@@ -2793,6 +3315,14 @@
"dev": true,
"requires": {
"minimist": "0.0.8"
+ },
+ "dependencies": {
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
+ }
}
},
"ms": {
@@ -2852,6 +3382,15 @@
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true
},
+ "no-case": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
+ "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
+ "dev": true,
+ "requires": {
+ "lower-case": "^1.1.1"
+ }
+ },
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
@@ -2861,6 +3400,18 @@
"abbrev": "1"
}
},
+ "normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
@@ -2891,6 +3442,34 @@
"which": "^1.2.10"
}
},
+ "npm-run-all": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
+ "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "chalk": "^2.4.1",
+ "cross-spawn": "^6.0.5",
+ "memorystream": "^0.3.1",
+ "minimatch": "^3.0.4",
+ "pidtree": "^0.3.0",
+ "read-pkg": "^3.0.0",
+ "shell-quote": "^1.6.1",
+ "string.prototype.padend": "^3.0.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ }
+ }
+ },
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
@@ -2917,6 +3496,12 @@
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
},
+ "oauth-sign": {
+ "version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+ "dev": true
+ },
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -2945,6 +3530,12 @@
}
}
},
+ "object-keys": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+ "dev": true
+ },
"object-visit": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
@@ -2991,6 +3582,12 @@
"wordwrap": "~0.0.2"
},
"dependencies": {
+ "minimist": {
+ "version": "0.0.10",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
+ "dev": true
+ },
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
@@ -3031,6 +3628,15 @@
"integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==",
"dev": true
},
+ "param-case": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",
+ "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=",
+ "dev": true,
+ "requires": {
+ "no-case": "^2.2.0"
+ }
+ },
"parent-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz",
@@ -3080,6 +3686,33 @@
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
"dev": true
},
+ "path-parse": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "requires": {
+ "pify": "^3.0.0"
+ }
+ },
+ "performance-now": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
+ "dev": true
+ },
+ "pidtree": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz",
+ "integrity": "sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==",
+ "dev": true
+ },
"pify": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
@@ -3152,12 +3785,33 @@
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
+ "promise": {
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
+ "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
+ "dev": true,
+ "requires": {
+ "asap": "~2.0.3"
+ }
+ },
"property-expr": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/property-expr/-/property-expr-1.5.1.tgz",
"integrity": "sha512-CGuc0VUTGthpJXL36ydB6jnbyOf/rAHFvmVrJlH+Rg0DqqLFQGAP6hIaxD/G0OAmBJPhXDHuEJigrp0e0wFV6g==",
"dev": true
},
+ "prr": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+ "dev": true
+ },
+ "psl": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.2.0.tgz",
+ "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==",
+ "dev": true
+ },
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
@@ -3174,6 +3828,12 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
+ "qs": {
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
+ "dev": true
+ },
"query-string": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz",
@@ -3184,6 +3844,17 @@
"strict-uri-encode": "^1.0.0"
}
},
+ "read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "dev": true,
+ "requires": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ }
+ },
"readable-stream": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
@@ -3210,6 +3881,61 @@
"readable-stream": "^2.0.2"
}
},
+ "recursive-copy": {
+ "version": "2.0.10",
+ "resolved": "https://registry.npmjs.org/recursive-copy/-/recursive-copy-2.0.10.tgz",
+ "integrity": "sha512-S9J9XJUnfZ2NUS3lK6lx6HWLl2nWui+f7AKuu+qoFs4ikEPYgZ3qKk1T6tmBnr7PzhtKnawE+6TREy9XQKmxCA==",
+ "dev": true,
+ "requires": {
+ "del": "^2.2.0",
+ "emitter-mixin": "0.0.3",
+ "errno": "^0.1.2",
+ "graceful-fs": "^4.1.4",
+ "junk": "^1.0.1",
+ "maximatch": "^0.1.0",
+ "mkdirp": "^0.5.1",
+ "pify": "^2.3.0",
+ "promise": "^7.0.1",
+ "slash": "^1.0.0"
+ },
+ "dependencies": {
+ "del": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
+ "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
+ "dev": true,
+ "requires": {
+ "globby": "^5.0.0",
+ "is-path-cwd": "^1.0.0",
+ "is-path-in-cwd": "^1.0.0",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0",
+ "rimraf": "^2.2.8"
+ }
+ },
+ "globby": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
+ "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
+ "dev": true,
+ "requires": {
+ "array-union": "^1.0.1",
+ "arrify": "^1.0.0",
+ "glob": "^7.0.3",
+ "object-assign": "^4.0.1",
+ "pify": "^2.0.0",
+ "pinkie-promise": "^2.0.0"
+ }
+ },
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ }
+ }
+ },
"regenerator-runtime": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
@@ -3232,6 +3958,12 @@
"integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
"dev": true
},
+ "relateurl": {
+ "version": "0.2.7",
+ "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+ "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
+ "dev": true
+ },
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -3250,6 +3982,87 @@
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
"dev": true
},
+ "request": {
+ "version": "2.88.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
+ "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
+ "dev": true,
+ "requires": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.8.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.6",
+ "extend": "~3.0.2",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.2",
+ "har-validator": "~5.1.0",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.19",
+ "oauth-sign": "~0.9.0",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.2",
+ "safe-buffer": "^5.1.2",
+ "tough-cookie": "~2.4.3",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.3.2"
+ },
+ "dependencies": {
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "dev": true
+ },
+ "safe-buffer": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
+ "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==",
+ "dev": true
+ },
+ "tough-cookie": {
+ "version": "2.4.3",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
+ "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
+ "dev": true,
+ "requires": {
+ "psl": "^1.1.24",
+ "punycode": "^1.4.1"
+ }
+ }
+ }
+ },
+ "request-promise-core": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
+ "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.11"
+ }
+ },
+ "request-promise-native": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz",
+ "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==",
+ "dev": true,
+ "requires": {
+ "request-promise-core": "1.1.2",
+ "stealthy-require": "^1.1.1",
+ "tough-cookie": "^2.3.3"
+ }
+ },
+ "resolve": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz",
+ "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==",
+ "dev": true,
+ "requires": {
+ "path-parse": "^1.0.6"
+ }
+ },
"resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
@@ -3285,22 +4098,6 @@
"dev": true,
"requires": {
"glob": "^7.1.3"
- },
- "dependencies": {
- "glob": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
- "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- }
}
},
"run-async": {
@@ -3392,6 +4189,18 @@
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
+ "shell-quote": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz",
+ "integrity": "sha1-9HgZSczkAmlxJ0MOo7PFR29IF2c=",
+ "dev": true,
+ "requires": {
+ "array-filter": "~0.0.0",
+ "array-map": "~0.0.0",
+ "array-reduce": "~0.0.0",
+ "jsonify": "~0.0.0"
+ }
+ },
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
@@ -3424,6 +4233,12 @@
}
}
},
+ "slash": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
+ "dev": true
+ },
"slice-ansi": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
@@ -3594,6 +4409,38 @@
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
"dev": true
},
+ "spdx-correct": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
+ "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
+ "dev": true,
+ "requires": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-exceptions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
+ "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
+ "dev": true
+ },
+ "spdx-expression-parse": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
+ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
+ "dev": true,
+ "requires": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-license-ids": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
+ "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
+ "dev": true
+ },
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@@ -3609,6 +4456,23 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
+ "sshpk": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
+ "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
+ "dev": true,
+ "requires": {
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "bcrypt-pbkdf": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "ecc-jsbn": "~0.1.1",
+ "getpass": "^0.1.1",
+ "jsbn": "~0.1.0",
+ "safer-buffer": "^2.0.2",
+ "tweetnacl": "~0.14.0"
+ }
+ },
"staged-git-files": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/staged-git-files/-/staged-git-files-1.1.2.tgz",
@@ -3636,6 +4500,12 @@
}
}
},
+ "stealthy-require": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
+ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
+ "dev": true
+ },
"strict-uri-encode": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
@@ -3659,6 +4529,17 @@
"strip-ansi": "^3.0.0"
}
},
+ "string.prototype.padend": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz",
+ "integrity": "sha1-86rvfBcZ8XDF6rHDK/eA2W4h8vA=",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.2",
+ "es-abstract": "^1.4.3",
+ "function-bind": "^1.0.2"
+ }
+ },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
@@ -3688,6 +4569,12 @@
"ansi-regex": "^2.0.0"
}
},
+ "strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true
+ },
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
@@ -3707,6 +4594,14 @@
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.2"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
},
"strip-url-auth": {
@@ -3881,6 +4776,16 @@
"integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=",
"dev": true
},
+ "tough-cookie": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
+ "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+ "dev": true,
+ "requires": {
+ "psl": "^1.1.28",
+ "punycode": "^2.1.1"
+ }
+ },
"trim-repeated": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
@@ -3888,6 +4793,14 @@
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.2"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ }
}
},
"tslib": {
@@ -3896,6 +4809,21 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==",
"dev": true
},
+ "tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "tweetnacl": {
+ "version": "0.14.5",
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "dev": true
+ },
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
@@ -3996,6 +4924,12 @@
"integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==",
"dev": true
},
+ "upper-case": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
+ "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=",
+ "dev": true
+ },
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
@@ -4023,6 +4957,33 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true
},
+ "uuid": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
+ "dev": true
+ },
+ "validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "dev": true,
+ "requires": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "verror": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "dev": true,
+ "requires": {
+ "assert-plus": "^1.0.0",
+ "core-util-is": "1.0.2",
+ "extsprintf": "^1.2.0"
+ }
+ },
"which": {
"version": "1.2.14",
"resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
diff --git a/package.json b/package.json
index a526afda0..f5f3de73a 100644
--- a/package.json
+++ b/package.json
@@ -7,36 +7,48 @@
"unpkg": "mithril.min.js",
"repository": "MithrilJS/mithril.js",
"scripts": {
- "dev": "node bundler/cli browser.js -output mithril.js -watch",
- "build": "npm run build-browser & npm run build-min",
- "build-browser": "node bundler/cli browser.js -output mithril.js",
- "build-min": "node bundler/cli browser.js -output mithril.min.js -minify -save",
"precommit": "lint-staged",
- "lintdocs": "node docs/lint",
- "gendocs": "node docs/generate",
- "lint": "eslint . || true",
- "lint:fix": "eslint . --fix",
+ "watch": "run-p watch:**",
+ "watch:js": "node bundler/cli browser.js -output mithril.js -watch",
+ "watch:docs": "node scripts/watch-docs.js",
+ "build": "run-p build:**",
+ "build:browser": "node bundler/cli browser.js -output mithril.js",
+ "build:docs": "node scripts/generate-docs",
+ "build:min": "node bundler/cli browser.js -output mithril.min.js -minify -save",
+ "lint": "run-s -cn lint:**",
+ "lint:js": "eslint . --cache",
+ "lint:docs": "node scripts/lint-docs",
"perf": "node performance/test-perf.js",
+ "pretest": "npm run lint",
"test": "node ospec/bin/ospec",
"posttest": "npm run lint",
"cover": "istanbul cover --print both ospec/bin/ospec",
- "release": "npm version -m 'v%s'",
- "preversion": "npm run test",
- "version": "npm run build && git add index.js mithril.js mithril.min.js README.md",
- "postversion": "git push --follow-tags"
+ "release": "node scripts/release",
+ "release:docs": "node scripts/update-docs",
+ "version": "npm run build && git add index.js mithril.js mithril.min.js README.md"
},
"devDependencies": {
"@alrra/travis-scripts": "^3.0.1",
+ "@babel/parser": "^7.5.5",
"benchmark": "^2.1.4",
"chokidar": "^2.0.4",
"dedent": "^0.7.0",
+ "escape-string-regexp": "^2.0.0",
"eslint": "^5.13.0",
"gh-pages": "^2.0.1",
+ "glob": "^7.1.4",
+ "html-minifier": "^4.0.0",
"istanbul": "^0.4.5",
"lint-staged": "^8.1.3",
"locater": "^1.3.0",
- "marked": "^0.6.2",
+ "marked": "^0.7.0",
+ "minimist": "^1.2.0",
+ "npm-run-all": "^4.1.5",
"pinpoint": "^1.1.0",
+ "recursive-copy": "^2.0.10",
+ "request": "^2.88.0",
+ "request-promise-native": "^1.0.7",
+ "rimraf": "^2.6.3",
"terser": "^3.16.1"
},
"bin": {
diff --git a/scripts/.eslintrc.js b/scripts/.eslintrc.js
new file mode 100644
index 000000000..a6122bb52
--- /dev/null
+++ b/scripts/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+ "extends": "../.eslintrc.js",
+ "parserOptions": {
+ "ecmaVersion": 2019,
+ },
+};
diff --git a/scripts/_command.js b/scripts/_command.js
new file mode 100644
index 000000000..3949c7b51
--- /dev/null
+++ b/scripts/_command.js
@@ -0,0 +1,36 @@
+"use strict"
+
+process.on("unhandledRejection", (e) => { throw e })
+
+function reportExec(e) {
+ if (!e.stdout || !e.stderr) return false
+ console.error(e.stack)
+
+ if (e.stdout && e.stdout.length) {
+ console.error(e.stdout.toString("utf-8"))
+ }
+ if (e.stderr && e.stderr.length) {
+ console.error(e.stderr.toString("utf-8"))
+ }
+
+ return true
+}
+
+exports.exec = (mod, init) => {
+ if (require.main === mod) {
+ // Skip the first tick.
+ Promise.resolve().then(init).catch((e) => {
+ // eslint-disable-next-line no-process-exit
+ if (reportExec(e)) process.exit(1)
+ else throw e
+ })
+ }
+}
+
+exports.run = async (init) => {
+ try {
+ await init()
+ } catch (e) {
+ if (!reportExec(e)) console.error(e)
+ }
+}
diff --git a/scripts/_upstream.js b/scripts/_upstream.js
new file mode 100644
index 000000000..0dc2020fc
--- /dev/null
+++ b/scripts/_upstream.js
@@ -0,0 +1,37 @@
+/* eslint-disable no-process-exit */
+"use strict"
+
+const {execFileSync} = require("child_process")
+
+const remoteInfo = execFileSync("git", ["remote", "-v"], {
+ windowsHide: true,
+ stdio: ["inherit", "pipe", "inherit"],
+ encoding: "utf-8",
+}).trim().split(/\r\n?|\n/g)
+
+function find(type) {
+ const regexp = new RegExp(
+ "\t(?:" +
+ "(?:(?:git+)?https?|git|ssh)://(?:[^@\\s]+@)?github\\.com/|" +
+ "git@github\\.com:" +
+ ")" +
+ `MithrilJS/mithril\\.js\\.git \\(${type}\\)$`
+ )
+
+ const line = remoteInfo.find((line) => regexp.test(line))
+
+ if (line == null) {
+ console.error(
+ "An upstream must be configured with both fetch and push!"
+ )
+ process.exit(1)
+ }
+
+ return {
+ branch: line.slice(0, line.indexOf("\t")),
+ repo: line.slice(line.lastIndexOf("\t") + 1, -(type.length + 3)),
+ }
+}
+
+exports.fetch = find("fetch")
+exports.push = find("push")
diff --git a/scripts/generate-docs.js b/scripts/generate-docs.js
new file mode 100644
index 000000000..2716a3086
--- /dev/null
+++ b/scripts/generate-docs.js
@@ -0,0 +1,176 @@
+"use strict"
+
+const {createReadStream, createWriteStream, promises: fs} = require("fs")
+const path = require("path")
+const {promisify} = require("util")
+const pipeline = promisify(require("stream").pipeline)
+const marked = require("marked")
+const rimraf = promisify(require("rimraf"))
+const copy = require("recursive-copy")
+const {execFileSync} = require("child_process")
+const escapeRegExp = require("escape-string-regexp")
+const HTMLMinifier = require("html-minifier")
+
+require("./_command").exec(module, () => generate())
+module.exports = generate
+
+// Minify our docs.
+const htmlMinifierConfig = {
+ collapseBooleanAttributes: true,
+ collapseWhitespace: true,
+ conservativeCollapse: true,
+ continueOnParseError: true,
+ minifyCss: {
+ compatibility: "ie9",
+ },
+ minifyJs: true,
+ minifyUrls: true,
+ preserveLineBreaks: true,
+ removeAttributeQuotes: true,
+ removeCdatasectionsFromCdata: true,
+ removeComments: true,
+ removeCommentsFromCdata: true,
+ removeEmptyAttributes: true,
+ removeOptionalTags: true,
+ removeRedundantAttributes: true,
+ removeScriptTypeAttributes: true,
+ removeStyleLinkTypeAttributes: true,
+ useShortDoctype: true,
+}
+
+async function generate() {
+ const r = (file) => path.resolve(__dirname, "..", file)
+
+ await rimraf(r("dist"))
+
+ const [guides, methods, layout, pkg] = await Promise.all([
+ fs.readFile(r("docs/nav-guides.md"), "utf-8"),
+ fs.readFile(r("docs/nav-methods.md"), "utf-8"),
+ fs.readFile(r("docs/layout.html"), "utf-8"),
+ fs.readFile(r("package.json"), "utf-8"),
+ fs.mkdir(r("dist"), {recursive: true}),
+ ])
+
+ const version = JSON.parse(pkg).version
+
+ // Set up archive directories
+ execFileSync("git", ["checkout", "gh-pages", "--", "archive"])
+ await fs.rename(r("archive"), r("dist/archive"))
+ await fs.mkdir(r(`dist/archive/v${version}`), {recursive: true})
+
+ function compilePage(file, markdown) {
+ file = path.basename(file)
+ const link = new RegExp(
+ `([ \t]*)(- )(\\[.+?\\]\\(${escapeRegExp(file)}\\))`
+ )
+ const src = link.test(guides) ? guides : methods
+ let body = markdown
+
+ // fix pipes in code tags
+ body = body.replace(/`((?:\S| -> |, )+)(\|)(\S+)`/gim,
+ (match, a, b, c) =>
+ `${(a + b + c).replace(/\|/g, "|")}
`
+ )
+
+ // inject menu
+ body = body.replace(
+ /(^# .+?(?:\r?\n){2,}?)(?:(-(?:.|\r|\n)+?)((?:\r?\n){2,})|)/m,
+ (match, title, nav) => {
+ if (!nav) {
+ return title + src.replace(link, "$1$2**$3**") + "\n\n"
+ }
+ return title + src.replace(link, (match, space, li, link) =>
+ `${space}${li}**${link}**\n${
+ nav.replace(/(^|\n)/g, `$1\t${space}`)
+ }`
+ ) + "\n\n"
+ }
+ )
+
+ // fix links
+ body = body.replace(/(\]\([^\)]+)(\.md)/gim, (match, path, extension) =>
+ path + ((/http/).test(path) ? extension : ".html")
+ )
+
+ // Fix type signatures containing Array<...>
+ body = body.replace(/(\W)Array<([^/<]+?)>/gim, "$1Array<$2>")
+
+ const markedHtml = marked(body)
+ const title = body.match(/^#([^\n\r]+)/i) || []
+
+ let result = layout
+
+ result = result.replace(
+ /Mithril\.js<\/title>/,
+ `${title[1]} - Mithril.js `
+ )
+
+ // update version
+ result = result.replace(/\[version\]/g, version)
+
+ // insert parsed HTML
+ result = result.replace(/\[body\]/, markedHtml)
+
+ // fix anchors
+ const anchorIds = new Map()
+
+ result = result.replace(
+ /(.+?)<\/h\1>/gim,
+ (match, n, id, text) => {
+ let anchor = text.toLowerCase()
+ .replace(/<(\/?)code>/g, "")
+ .replace(/.+?<\/a>/g, "")
+ .replace(/\.|\[|\]|"|\/|\(|\)/g, "")
+ .replace(/\s/g, "-");
+
+ const anchorId = anchorIds.get(anchor)
+ anchorIds.set(anchor, anchorId != null ? anchorId + 1 : 0)
+ if (anchorId != null) anchor += anchorId
+ return `` +
+ `${text} ` +
+ ` `
+ }
+ )
+
+ return result
+ }
+
+ async function generate(file) {
+ try {
+ const handle = await fs.open(file, "r")
+ const relative = path.relative(r("docs"), file)
+ const archive = r(`dist/archive/v${version}/${relative}`)
+ await fs.mkdir(path.dirname(archive), {recursive: true})
+
+ if (file.endsWith(".md")) {
+ const html = compilePage(file, await handle.readFile("utf-8"))
+ const minified = HTMLMinifier.minify(html, htmlMinifierConfig)
+ await fs.writeFile(archive.replace(/\.md$/, ".html"), minified)
+ } else if (file.endsWith(".html")) {
+ const html = await handle.readFile("utf-8")
+ const minified = HTMLMinifier.minify(html, htmlMinifierConfig)
+ await fs.writeFile(archive, minified)
+ } else {
+ await pipeline(
+ createReadStream(null, {fd: handle.fd}),
+ createWriteStream(archive)
+ )
+ }
+ } catch (e) {
+ if (e.code !== "EISDIR") throw e
+ const files = await fs.readdir(file)
+ const devOnly = /^layout\.html$|^tutorials$|^archive$|^nav-/
+ await Promise.all(
+ files
+ .filter((f) => !devOnly.test(f))
+ .map((f) => path.join(file, f))
+ .map(generate)
+ )
+ }
+ }
+
+ await generate(r("docs"))
+ await copy(r(`dist/archive/v${version}`), r("dist"))
+ // Just ensure it exists.
+ await (await fs.open(r("dist/.nojekyll"), "a")).close()
+}
diff --git a/scripts/lint-docs.js b/scripts/lint-docs.js
new file mode 100644
index 000000000..692f50800
--- /dev/null
+++ b/scripts/lint-docs.js
@@ -0,0 +1,184 @@
+#!/usr/bin/env node
+"use strict"
+
+const {promises} = require("fs")
+const path = require("path")
+const {Glob} = require("glob")
+const marked = require("marked")
+// Accept just about anything
+const babelParser = require("@babel/parser")
+// Peer dependency on `request`
+const request = require("request-promise-native")
+
+require("./_command").exec(module, () => lint())
+
+// lint rules
+class LintRenderer extends marked.Renderer {
+ constructor(file) {
+ super()
+ this._file = file
+ this._dir = path.dirname(file)
+ this._context = undefined
+ this._code = undefined
+ this._lang = undefined
+ this._error = undefined
+ this._awaiting = []
+ }
+
+ _emitTolerate(...data) {
+ let str = data.join("\n")
+ if (str.endsWith("\n")) str = str.slice(0, -1)
+ console.log(`${this._file} - ${str}\n${"-".repeat(60)}`)
+ }
+
+ _emit(...data) {
+ this._emitTolerate(...data)
+ process.exitCode = 1
+ }
+
+ _block() {
+ return `\`\`\`${this._lang || ""}\n${this._code}\n\`\`\``
+ }
+
+ link(href) {
+ // Don't fail if something byzantine shows up - it's the freaking
+ // internet. Just log it and move on.
+ const httpError = (e) =>
+ this._emitTolerate(`http error for ${href}`, e.message)
+
+ // Prefer https: > http: where possible, but allow http: when https: is
+ // inaccessible.
+ if ((/^https?:\/\//).test(href)) {
+ const url = href.replace(/#.*$/, "")
+ this._awaiting.push(request.head(url).then(() => {
+ const isHTTPS = href.startsWith("https:")
+ if (!isHTTPS) {
+ return request.head(`https:${url.slice(7)}`).then(
+ () => this._emit("change http: to https:"),
+ () => { /* ignore inner errors */ }
+ )
+ }
+ }, (e) => {
+ if (e.statusCode === 404) {
+ this._emit(`broken external link: ${href}`)
+ } else {
+ if (
+ e.error.code === "ERR_TLS_CERT_ALTNAME_INVALID" &&
+ href.startsWith("https://")
+ ) {
+ return request.head(`http:${url.slice(6)}`).then(
+ () => this._emit(`change ${href} to use http:`),
+ // ignore inner errors
+ () => httpError(e)
+ )
+ }
+ httpError(e)
+ }
+ }))
+ } else {
+ const exec = (/^([^#?]*\.md)(?:$|\?|#)/).exec(href)
+ if (exec != null) {
+ const resolved = path.resolve(this._dir, exec[1])
+ this._awaiting.push(promises.access(resolved).catch(() => {
+ this._emit(`broken internal link: ${href}`)
+ }))
+ }
+ }
+ }
+
+ code(code, lang) {
+ this._code = code
+ this._lang = lang
+ if (!lang || lang === "js" || lang === "javascript") {
+ try {
+ // Could be within any production.
+ babelParser.parse(code, {
+ sourceType: "unambiguous",
+ allowReturnOutsideFunction: true,
+ allowAwaitOutsideFunction: true,
+ allowSuperOutsideMethod: true,
+ allowUndeclaredExports: true,
+ plugins: ["dynamicImport"],
+ })
+ } catch (e) {
+ this._error = e
+ }
+ }
+ this._ensureCodeIsHighlightable()
+ this._ensureCodeHasConsistentTag()
+ this._ensureCodeIsSyntaticallyValid()
+ this._ensureCommentStyle()
+ }
+
+ _ensureCodeIsHighlightable() {
+ // We only care about what's not tagged here.
+ if (!this._lang) {
+ // TODO: ensure all code blocks have tags, and check this in CI.
+ if (this._error == null) {
+ this._emit(
+ "Code block possibly missing `javascript` language tag",
+ this._block(),
+ )
+ }
+
+ try {
+ JSON.parse(this._code)
+ this._emit(
+ "Code block possibly missing `json` language tag",
+ this._block(),
+ )
+ } catch {
+ // ignore
+ }
+ }
+ }
+
+ _ensureCodeHasConsistentTag() {
+ if (this._lang === "js") {
+ this._emit("JS code block has wrong language tag", this._block())
+ }
+ }
+
+ _ensureCodeIsSyntaticallyValid() {
+ if (!this.lang || !(/^js$|^javascript$/).test(this._lang)) return
+ if (this._error != null) {
+ this._emit(
+ "JS code block has invalid syntax", this._error.message,
+ this._block()
+ )
+ }
+ }
+
+ _ensureCommentStyle() {
+ if (!this.lang || !(/^js$|^javascript$/).test(this._lang)) return
+ if ((/(^|\s)\/\/[\S]/).test(this._code)) {
+ this._emit("Comment is missing a preceding space", this._block())
+ }
+ }
+}
+
+function lint() {
+ return new Promise((resolve, reject) => {
+ const glob = new Glob(path.resolve(__dirname, "../docs/**/*.md"), {
+ ignore: [
+ "**/change-log.md",
+ "**/migration-*.md",
+ "**/node_modules/**",
+ ],
+ nodir: true,
+ })
+ const awaiting = []
+
+ glob.on("match", (file) => {
+ awaiting.push(promises.readFile(file, "utf-8").then((contents) => {
+ const renderer = new LintRenderer(file)
+ marked(contents, {renderer})
+ return Promise.all(renderer._awaiting)
+ }))
+ })
+
+ glob.on("error", reject)
+ glob.on("end", () => resolve(Promise.all(awaiting)))
+ })
+}
+module.exports = lint
diff --git a/scripts/release.js b/scripts/release.js
new file mode 100644
index 000000000..9cd13aaea
--- /dev/null
+++ b/scripts/release.js
@@ -0,0 +1,153 @@
+#!/usr/bin/env node
+/* eslint-disable no-process-exit */
+"use strict"
+
+// This is my temporary hack to simplify deployment until I fix the underlying
+// problems in these bugs:
+// - https://github.com/MithrilJS/mithril.js/issues/2417
+// - https://github.com/MithrilJS/mithril.js/pull/2422
+//
+// Depending on the complexity, it might become permanent. It really isn't that
+// helpful to create a release on Travis vs locally, aside from a couple extra
+// potential 2FA prompts by npm during login and publish.
+
+if (require.main !== module) {
+ throw new Error("This is a script, not a module!")
+}
+
+const path = require("path")
+const fs = require("fs")
+const {execFileSync} = require("child_process")
+const rimraf = require("rimraf")
+
+function showHelp() {
+ console.error(`
+scripts/release.sh increment [ --preid id ]
+
+Invoke as \`scripts/release.sh\` to invoke the release sequence, specifying the
+version increment via \`increment\` (required). Here's how they all work:
+
+- \`major\` increments from 1.0.0 or 2.0.0-beta.0 to 2.0.0
+- \`minor\` increments from 1.0.0 to 1.1.0
+- \`patch\` increments from 1.0.0 to 1.0.1
+- \`premajor\` increments from 1.0.0 to 2.0.0-beta.0
+- \`preminor\` increments from 1.0.0 to 1.1.0-beta.0
+- \`prepatch\` increments from 1.0.0 to 1.0.1-beta.0
+- \`prerelease\` increments from 2.0.0-beta.0 to 2.0.0-beta.1
+
+\`--preid beta\` specifies the \`beta\` part above (default). It's required for
+all \`pre*\` increment types except \`prerelease\`.
+
+See the docs for \`npm version\` for
+details on the \`increment\` parameter.
+`.trim())
+ process.exit(0)
+}
+
+function bail(...args) {
+ console.error(...args)
+ process.exit(1)
+}
+
+const rootDir = path.dirname(__dirname)
+const p = (...args) => path.resolve(rootDir, ...args)
+
+function readVersion() {
+ return JSON.parse(fs.readFileSync(p("../package.json"), "utf-8")).version
+}
+
+const parsed = require("minimist")(process.argv.slice(2), {
+ boolean: ["help"],
+ alias: {help: ["h", "?"]},
+ string: ["preid"],
+ "--": true,
+})
+
+if (parsed.help || !parsed["--"].length) showHelp()
+const publishType = parsed["--"][0]
+const publishPreid = parsed.preid
+const publishArgs = publishType.startsWith("pre") ? ["--tag", "next"] : []
+let releaseArgs = []
+
+if (publishType.startsWith("pre") && publishType !== "prerelease") {
+ if (publishPreid == null) {
+ bail("`pre*` increments other than `prerelease` require `--preid`")
+ }
+ releaseArgs = [`--preid=${publishPreid}`]
+}
+
+function exec(cmd, args, opts) {
+ return execFileSync(name, args, {
+ windowsHide: true,
+ stdio: "inherit",
+ encoding: "utf-8",
+ ...opts,
+ })
+}
+
+const upstream = require("./_upstream")
+
+exec("git", ["checkout", "next"])
+exec("git", ["pull", "--rebase", upstream.fetch.branch, "next"])
+
+// Because I'm too lazy to make everything async.
+exec("read", ["-rsp", `
+Update "Upcoming" in \`docs/change-log.md\`. If moving a prerelease to stable,
+also replace all references to \`mithril@next\` to \`mithril\`, including in
+Flems snippets. Press enter once ready to continue.
+`.trim()], {shell: true})
+
+// Verify the changelog was updated
+let changelogUpdated = false
+let treeDirty = false
+
+for (const line of exec("git", ["status", "-z"]).split(/\0/g)) {
+ switch (line) {
+ case " M CHANGELOG.md":
+ case "M CHANGELOG.md":
+ case "MM CHANGELOG.md":
+ changelogUpdated = true
+ break
+
+ default:
+ treeDirty = true
+ }
+}
+
+if (!changelogUpdated || treeDirty) {
+ if (!changelogUpdated) console.error("Error: Changelog must be updated!")
+ if (!treeDirty) console.error("Error: Tree must not be otherwise dirty!")
+ process.exit(1)
+}
+
+exec("git", ["add", "."])
+exec("git", ["commit", "-m", "Preparing for release"])
+
+exec("git", ["checkout", "master"])
+exec("git", ["pull", "--rebase", upstream.fetch.branch, "master"])
+// There may be merge conflicts with `index.js` and/or the bundle - just ignore
+// them. Whatever they have is canon, as is the case with everything else.
+exec("git", ["merge", "next", "-s", "theirs"])
+rimraf.sync(p("node_modules"))
+exec("npm", ["install-test"])
+
+exec("npm", ["version", "-m", "v%s", publishType, ...releaseArgs])
+
+exec("git", ["push", "--follow-tags", "origin", "master"])
+exec("git", ["push", "--follow-tags", upstream.push.branch, "master"])
+
+exec("git", ["checkout", "next"])
+exec("git", ["checkout", "master", "--", "mithril.js", "mithril.min.js"])
+// That's already been updated in `master`.
+exec("git", ["commit", "-m", `Generated bundles for ${readVersion()} [skip ci]`])
+
+exec("git", ["push"])
+exec("git", ["push", upstream.push.branch, "next"])
+
+exec("git", ["checkout", "master"])
+
+exec("npm", ["login"])
+exec("npm", ["publish", ...publishArgs])
+exec("npm", ["logout"])
+
+require("./update-docs")()
diff --git a/scripts/update-docs.js b/scripts/update-docs.js
new file mode 100644
index 000000000..d21fe0539
--- /dev/null
+++ b/scripts/update-docs.js
@@ -0,0 +1,39 @@
+#!/usr/bin/env node
+/* eslint-disable no-process-exit */
+"use strict"
+
+// This is my temporary hack to simplify deployment until I fix the underlying
+// problems in these bugs:
+// - https://github.com/MithrilJS/mithril.js/issues/2417
+// - https://github.com/MithrilJS/mithril.js/pull/2422
+
+const path = require("path")
+const {execFileSync} = require("child_process")
+const ghPages = require("gh-pages")
+const upstream = require("./_upstream")
+const generate = require("./generate-docs")
+
+require("./_command")(module, () => update())
+module.exports = update
+
+async function update() {
+ await generate()
+ const commit = execFileSync("git", ["rev-parse", "--verify", "HEAD"], {
+ windowsHide: true,
+ stdio: "inherit",
+ encoding: "utf-8",
+ })
+
+ await ghPages.publish(path.resolve(__dirname, "../dist"), {
+ // Note: once this is running on Travis again, run
+ // `git remote add upstream git@github.com:MithrilJS/mithril.js.git` to
+ // force it to go over SSH so the saved keys are used.
+ // https://github.com/tschaub/gh-pages/issues/160
+ repo: upstream.push.repo,
+ remote: upstream.push.branch,
+ src: ["**/*", ".nojekyll"],
+ message: `Generated docs for commit ${commit} [skip ci]`,
+ // May want to enable this if an API token resolves the issue.
+ // silent: !!process.env.TRAVIS_CI,
+ })
+}
diff --git a/scripts/watch-docs.js b/scripts/watch-docs.js
new file mode 100644
index 000000000..b6e25c052
--- /dev/null
+++ b/scripts/watch-docs.js
@@ -0,0 +1,10 @@
+"use strict"
+
+const path = require("path")
+const chokidar = require("chokidar")
+const generate = require("./generate-docs")
+const command = require("./_command")
+
+chokidar.watch(path.resolve(__dirname, "../docs")).on("all", () => {
+ command.run(() => generate())
+})