Eli Perelman
8 years ago
47 changed files with 7979 additions and 5824 deletions
@ -1,42 +0,0 @@ |
|||||
#! /usr/bin/env node |
|
||||
|
|
||||
const { readdirSync, writeFileSync } = require('fs'); |
|
||||
const { resolve, join } = require('path'); |
|
||||
const { inc } = require('semver'); |
|
||||
const rootPkg = require('../package.json'); |
|
||||
|
|
||||
const releases = ['major', 'minor', 'patch']; |
|
||||
const packages = resolve(__dirname, '../packages'); |
|
||||
const [,,release] = process.argv; |
|
||||
|
|
||||
if (!releases.includes(release)) { |
|
||||
throw new Error(`Release must be one of: major, minor, patch`); |
|
||||
} |
|
||||
|
|
||||
const version = inc(rootPkg.version, release); |
|
||||
|
|
||||
readdirSync(packages) |
|
||||
.map(name => { |
|
||||
const pkgPath = join(packages, name, 'package.json'); |
|
||||
const pkg = require(pkgPath); |
|
||||
|
|
||||
console.log(`Bumping ${name} to v${version}`); |
|
||||
pkg.version = version; |
|
||||
|
|
||||
if (pkg.peerDependencies && pkg.peerDependencies.neutrino) { |
|
||||
console.log(` Bumping neutrino peer dependency to v${version}`); |
|
||||
pkg.peerDependencies.neutrino = `^${version}`; |
|
||||
} |
|
||||
|
|
||||
Object |
|
||||
.keys(pkg.linkDependencies || {}) |
|
||||
.map(key => { |
|
||||
console.log(` Bumping ${key} linked dependency to v${version}`); |
|
||||
pkg.linkDependencies[key].version = version; |
|
||||
}); |
|
||||
|
|
||||
writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`); |
|
||||
}); |
|
||||
|
|
||||
rootPkg.version = version; |
|
||||
writeFileSync(resolve(__dirname, '../package.json'), `${JSON.stringify(rootPkg, null, 2)}\n`); |
|
@ -0,0 +1 @@ |
|||||
|
# Neutrino Jest Preset |
@ -0,0 +1,24 @@ |
|||||
|
{ |
||||
|
"name": "neutrino-preset-jest", |
||||
|
"version": "4.0.0", |
||||
|
"description": "Neutrino preset for testing Neutrino projects with Jest", |
||||
|
"main": "src/index.js", |
||||
|
"keywords": [ |
||||
|
"neutrino", |
||||
|
"neutrino-preset", |
||||
|
"jest" |
||||
|
], |
||||
|
"author": "Eli Perelman <eli@eliperelman.com>", |
||||
|
"license": "MPL-2.0", |
||||
|
"repository": "mozilla-neutrino/neutrino-dev", |
||||
|
"peerDependencies": { |
||||
|
"neutrino": "^4.0.0" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"babel-core": "^6.22.1", |
||||
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", |
||||
|
"babel-preset-jest": "^18.0.0", |
||||
|
"deepmerge": "^1.3.2", |
||||
|
"jest-cli": "^18.1.0" |
||||
|
} |
||||
|
} |
@ -0,0 +1 @@ |
|||||
|
module.exports = 'test-file-stub'; |
@ -0,0 +1,100 @@ |
|||||
|
const { runCLI } = require('jest-cli'); |
||||
|
const fs = require('fs'); |
||||
|
const path = require('path'); |
||||
|
const merge = require('deepmerge'); |
||||
|
const os = require('os'); |
||||
|
const pkg = require(path.join(process.cwd(), 'package.json')); |
||||
|
|
||||
|
function getBabelOptions(config) { |
||||
|
let loader; |
||||
|
|
||||
|
config.module.rules.some(r => { |
||||
|
let l = r.use.find(l => l.loader.includes('babel-loader')); |
||||
|
|
||||
|
if (l) { |
||||
|
loader = l; |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
return loader.options; |
||||
|
} |
||||
|
|
||||
|
function normalizeJestConfig(jest, config, args) { |
||||
|
const extensions = new Set(jest.moduleFileExtensions || []); |
||||
|
const directories = new Set(jest.moduleDirectories || []); |
||||
|
|
||||
|
Object |
||||
|
.keys(config.alias || {}) |
||||
|
.map(key => jest.moduleNameMapper[key] = path.join('<rootDir>', config.alias[key])); |
||||
|
|
||||
|
config.resolve.extensions.forEach(e => extensions.add(e.replace('.', ''))); |
||||
|
config.resolve.modules.forEach(m => directories.add(m)); |
||||
|
jest.moduleFileExtensions = [...extensions]; |
||||
|
jest.moduleDirectories = [...directories]; |
||||
|
jest.globals = Object.assign({}, jest.globals, { BABEL_OPTIONS: getBabelOptions(config) }); |
||||
|
|
||||
|
if (args.files.length) { |
||||
|
jest.testRegex = args.files.join('|').replace('.', '\\.'); |
||||
|
} |
||||
|
|
||||
|
return Object.assign({}, jest, pkg.jest); |
||||
|
} |
||||
|
|
||||
|
module.exports = neutrino => { |
||||
|
neutrino.on('test', (config, args) => { |
||||
|
const jest = normalizeJestConfig(neutrino.custom.jest, config, args); |
||||
|
const configFile = path.join(os.tmpdir(), 'config.json'); |
||||
|
|
||||
|
return new Promise((resolve, reject) => { |
||||
|
fs.writeFileSync(configFile, `${JSON.stringify(jest, null, 2)}\n`); |
||||
|
|
||||
|
runCLI( |
||||
|
{ config: configFile, watch: args.watch }, |
||||
|
jest.rootDir || process.cwd(), |
||||
|
result => { |
||||
|
if (result.numFailedTests || result.numFailedTestSuites) { |
||||
|
reject(); |
||||
|
} else { |
||||
|
resolve(); |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
neutrino.custom.jest = { |
||||
|
bail: true, |
||||
|
transform: { |
||||
|
"\\.(js|jsx)$": require.resolve('./transformer') |
||||
|
}, |
||||
|
testPathDirs: [path.join(process.cwd(), 'test')], |
||||
|
testRegex: '(_test|_spec|\\.test|\\.spec)\\.jsx?$', |
||||
|
moduleFileExtensions: ['js', 'jsx'], |
||||
|
moduleDirectories: ['node_modules'], |
||||
|
moduleNameMapper: { |
||||
|
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': require.resolve('./file-mock'), |
||||
|
'\\.(css|less|sass)$': require.resolve('./style-mock') |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const config = neutrino.configs.find(c => c.module.rules.has('compile')); |
||||
|
|
||||
|
config |
||||
|
.module |
||||
|
.rule('compile') |
||||
|
.loader('babel', ({ options }) => { |
||||
|
return { |
||||
|
options: merge(options, { |
||||
|
env: { |
||||
|
test: { |
||||
|
retainLines: true, |
||||
|
presets: [require.resolve('babel-preset-jest')], |
||||
|
plugins: [require.resolve('babel-plugin-transform-es2015-modules-commonjs')] |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}; |
||||
|
}); |
||||
|
}; |
@ -0,0 +1 @@ |
|||||
|
module.exports = {}; |
@ -0,0 +1,9 @@ |
|||||
|
const babel = require('babel-core'); |
||||
|
|
||||
|
module.exports = { |
||||
|
process(src, filename, config) { |
||||
|
return babel.util.canCompile(filename) ? |
||||
|
babel.transform(src, Object.assign({}, { filename }, config.globals.BABEL_OPTIONS)).code : |
||||
|
src; |
||||
|
} |
||||
|
}; |
File diff suppressed because it is too large
@ -0,0 +1 @@ |
|||||
|
# Neutrino Karma Preset |
@ -0,0 +1,29 @@ |
|||||
|
{ |
||||
|
"name": "neutrino-preset-karma", |
||||
|
"version": "4.0.0", |
||||
|
"description": "Neutrino preset for testing Neutrino projects with Karma", |
||||
|
"main": "src/index.js", |
||||
|
"keywords": [ |
||||
|
"neutrino", |
||||
|
"neutrino-preset", |
||||
|
"mocha" |
||||
|
], |
||||
|
"author": "Eli Perelman <eli@eliperelman.com>", |
||||
|
"license": "MPL-2.0", |
||||
|
"repository": "mozilla-neutrino/neutrino-dev", |
||||
|
"peerDependencies": { |
||||
|
"neutrino": "^4.0.0" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"karma": "^1.4.1", |
||||
|
"karma-chrome-launcher": "^2.0.0", |
||||
|
"karma-coverage": "^1.1.1", |
||||
|
"karma-mocha": "^1.3.0", |
||||
|
"karma-mocha-reporter": "^2.2.2", |
||||
|
"karma-webpack": "^2.0.2", |
||||
|
"mocha": "^3.2.0", |
||||
|
"mocha-coverage-reporter": "^0.0.1", |
||||
|
"webpack": "^2.2.1", |
||||
|
"webpack-dev-middleware": "^1.10.0" |
||||
|
} |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
const { Server } = require('karma'); |
||||
|
|
||||
|
module.exports = neutrino => { |
||||
|
neutrino.on('test', (config, args) => { |
||||
|
const { karma } = neutrino.custom; |
||||
|
|
||||
|
delete config.plugins; |
||||
|
karma.webpack = config; |
||||
|
karma.singleRun = !args.watch; |
||||
|
karma.autoWatch = args.watch; |
||||
|
|
||||
|
if (args.files && args.files.length) { |
||||
|
karma.files = args.files; |
||||
|
} |
||||
|
|
||||
|
return new Promise(resolve => { |
||||
|
new Server(karma, resolve).start(); |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
neutrino.custom.karma = { |
||||
|
plugins: [ |
||||
|
require.resolve('karma-webpack'), |
||||
|
require.resolve('karma-chrome-launcher'), |
||||
|
require.resolve('karma-coverage'), |
||||
|
require.resolve('karma-mocha'), |
||||
|
require.resolve('karma-mocha-reporter') |
||||
|
], |
||||
|
basePath: process.cwd(), |
||||
|
browsers: [process.env.CI ? 'ChromeCI' : 'Chrome'], |
||||
|
customLaunchers: { |
||||
|
ChromeCI: { |
||||
|
base: 'Chrome', |
||||
|
flags: ['--no-sandbox'] |
||||
|
} |
||||
|
}, |
||||
|
frameworks: ['mocha'], |
||||
|
files: ['test/**/*_test.js'], |
||||
|
preprocessors: { |
||||
|
'test/**/*_test.js': ['webpack'], |
||||
|
'src/**/*.js': ['webpack'] |
||||
|
}, |
||||
|
webpackMiddleware: { noInfo: true }, |
||||
|
reporters: ['mocha', 'coverage'], |
||||
|
coverageReporter: { |
||||
|
dir: '.coverage', |
||||
|
reporters: [ |
||||
|
{ type: 'html', subdir: 'report-html' }, |
||||
|
{ type: 'lcov', subdir: 'report-lcov' } |
||||
|
] |
||||
|
} |
||||
|
}; |
||||
|
}; |
File diff suppressed because it is too large
@ -0,0 +1 @@ |
|||||
|
# Neutrino Mocha Preset |
@ -0,0 +1,26 @@ |
|||||
|
{ |
||||
|
"name": "neutrino-preset-mocha", |
||||
|
"version": "4.0.0", |
||||
|
"description": "Neutrino preset for testing Neutrino projects with Mocha", |
||||
|
"main": "src/index.js", |
||||
|
"keywords": [ |
||||
|
"neutrino", |
||||
|
"neutrino-preset", |
||||
|
"mocha" |
||||
|
], |
||||
|
"author": "Eli Perelman <eli@eliperelman.com>", |
||||
|
"license": "MPL-2.0", |
||||
|
"repository": "mozilla-neutrino/neutrino-dev", |
||||
|
"peerDependencies": { |
||||
|
"neutrino": "^4.0.0" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
"babel-loader": "^6.2.10", |
||||
|
"babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", |
||||
|
"babel-register": "^6.22.0", |
||||
|
"change-case": "^3.0.1", |
||||
|
"deepmerge": "^1.3.2", |
||||
|
"mocha": "^3.2.0", |
||||
|
"webpack-chain": "^1.1.0" |
||||
|
} |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
const mocha = require('./mocha'); |
||||
|
const merge = require('deepmerge'); |
||||
|
|
||||
|
module.exports = neutrino => { |
||||
|
neutrino.on('test', (config, args) => { |
||||
|
let loader; |
||||
|
|
||||
|
config.module.rules.some(r => { |
||||
|
let l = r.use.find(l => l.loader.includes('babel-loader')); |
||||
|
|
||||
|
if (l) { |
||||
|
loader = l; |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
return mocha(neutrino.custom.mocha, loader.options, args.files); |
||||
|
}); |
||||
|
|
||||
|
neutrino.custom.mocha = { |
||||
|
reporter: 'spec', |
||||
|
ui: 'tdd', |
||||
|
bail: true |
||||
|
}; |
||||
|
|
||||
|
const config = neutrino.configs.find(c => c.module.rules.has('compile')); |
||||
|
|
||||
|
config |
||||
|
.module |
||||
|
.rule('compile') |
||||
|
.loader('babel', ({ options }) => { |
||||
|
return { |
||||
|
options: merge(options, { |
||||
|
env: { |
||||
|
test: { |
||||
|
plugins: [require.resolve('babel-plugin-transform-es2015-modules-commonjs')] |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}; |
||||
|
}); |
||||
|
}; |
@ -0,0 +1,34 @@ |
|||||
|
const spawn = require('child_process').spawn; |
||||
|
const toParam = require('change-case').paramCase; |
||||
|
|
||||
|
let proc; |
||||
|
|
||||
|
module.exports = (mochaOpts = {}, babelOpts = {}, files = []) => new Promise(resolve => { |
||||
|
if (proc) { |
||||
|
proc.kill(); |
||||
|
} |
||||
|
|
||||
|
if (files.length) { |
||||
|
mochaOpts.recursive = true; |
||||
|
} |
||||
|
|
||||
|
process.env.NEUTRINO_BABEL_CONFIG = JSON.stringify(babelOpts); |
||||
|
|
||||
|
const argv = Object |
||||
|
.keys(mochaOpts) |
||||
|
.reduce((argv, key) => { |
||||
|
const value = mochaOpts[key]; |
||||
|
|
||||
|
return value === true ? |
||||
|
[...argv, `--${toParam(key)}`] : |
||||
|
[...argv, `--${toParam(key)}`, value]; |
||||
|
}, ['--require', require.resolve('./register')]); |
||||
|
|
||||
|
proc = spawn(require.resolve('mocha/bin/mocha'), [...argv, ...files], { |
||||
|
cwd: process.cwd(), |
||||
|
env: process.env, |
||||
|
stdio: 'inherit' |
||||
|
}); |
||||
|
|
||||
|
proc.on('close', resolve); |
||||
|
}); |
@ -0,0 +1,670 @@ |
|||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
||||
|
# yarn lockfile v1 |
||||
|
|
||||
|
|
||||
|
ansi-regex@^2.0.0: |
||||
|
version "2.1.1" |
||||
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" |
||||
|
|
||||
|
ansi-styles@^2.2.1: |
||||
|
version "2.2.1" |
||||
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" |
||||
|
|
||||
|
babel-code-frame@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" |
||||
|
dependencies: |
||||
|
chalk "^1.1.0" |
||||
|
esutils "^2.0.2" |
||||
|
js-tokens "^3.0.0" |
||||
|
|
||||
|
babel-core@^6.22.0: |
||||
|
version "6.22.1" |
||||
|
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648" |
||||
|
dependencies: |
||||
|
babel-code-frame "^6.22.0" |
||||
|
babel-generator "^6.22.0" |
||||
|
babel-helpers "^6.22.0" |
||||
|
babel-messages "^6.22.0" |
||||
|
babel-register "^6.22.0" |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-template "^6.22.0" |
||||
|
babel-traverse "^6.22.1" |
||||
|
babel-types "^6.22.0" |
||||
|
babylon "^6.11.0" |
||||
|
convert-source-map "^1.1.0" |
||||
|
debug "^2.1.1" |
||||
|
json5 "^0.5.0" |
||||
|
lodash "^4.2.0" |
||||
|
minimatch "^3.0.2" |
||||
|
path-is-absolute "^1.0.0" |
||||
|
private "^0.1.6" |
||||
|
slash "^1.0.0" |
||||
|
source-map "^0.5.0" |
||||
|
|
||||
|
babel-generator@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.22.0.tgz#d642bf4961911a8adc7c692b0c9297f325cda805" |
||||
|
dependencies: |
||||
|
babel-messages "^6.22.0" |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-types "^6.22.0" |
||||
|
detect-indent "^4.0.0" |
||||
|
jsesc "^1.3.0" |
||||
|
lodash "^4.2.0" |
||||
|
source-map "^0.5.0" |
||||
|
|
||||
|
babel-helpers@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.22.0.tgz#d275f55f2252b8101bff07bc0c556deda657392c" |
||||
|
dependencies: |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-template "^6.22.0" |
||||
|
|
||||
|
babel-loader@^6.2.10: |
||||
|
version "6.2.10" |
||||
|
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-6.2.10.tgz#adefc2b242320cd5d15e65b31cea0e8b1b02d4b0" |
||||
|
dependencies: |
||||
|
find-cache-dir "^0.1.1" |
||||
|
loader-utils "^0.2.11" |
||||
|
mkdirp "^0.5.1" |
||||
|
object-assign "^4.0.1" |
||||
|
|
||||
|
babel-messages@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.22.0.tgz#36066a214f1217e4ed4164867669ecb39e3ea575" |
||||
|
dependencies: |
||||
|
babel-runtime "^6.22.0" |
||||
|
|
||||
|
babel-plugin-transform-es2015-modules-commonjs@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.22.0.tgz#6ca04e22b8e214fb50169730657e7a07dc941145" |
||||
|
dependencies: |
||||
|
babel-plugin-transform-strict-mode "^6.22.0" |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-template "^6.22.0" |
||||
|
babel-types "^6.22.0" |
||||
|
|
||||
|
babel-plugin-transform-strict-mode@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" |
||||
|
dependencies: |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-types "^6.22.0" |
||||
|
|
||||
|
babel-register@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.22.0.tgz#a61dd83975f9ca4a9e7d6eff3059494cd5ea4c63" |
||||
|
dependencies: |
||||
|
babel-core "^6.22.0" |
||||
|
babel-runtime "^6.22.0" |
||||
|
core-js "^2.4.0" |
||||
|
home-or-tmp "^2.0.0" |
||||
|
lodash "^4.2.0" |
||||
|
mkdirp "^0.5.1" |
||||
|
source-map-support "^0.4.2" |
||||
|
|
||||
|
babel-runtime@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.22.0.tgz#1cf8b4ac67c77a4ddb0db2ae1f74de52ac4ca611" |
||||
|
dependencies: |
||||
|
core-js "^2.4.0" |
||||
|
regenerator-runtime "^0.10.0" |
||||
|
|
||||
|
babel-template@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.22.0.tgz#403d110905a4626b317a2a1fcb8f3b73204b2edb" |
||||
|
dependencies: |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-traverse "^6.22.0" |
||||
|
babel-types "^6.22.0" |
||||
|
babylon "^6.11.0" |
||||
|
lodash "^4.2.0" |
||||
|
|
||||
|
babel-traverse@^6.22.0, babel-traverse@^6.22.1: |
||||
|
version "6.22.1" |
||||
|
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.22.1.tgz#3b95cd6b7427d6f1f757704908f2fc9748a5f59f" |
||||
|
dependencies: |
||||
|
babel-code-frame "^6.22.0" |
||||
|
babel-messages "^6.22.0" |
||||
|
babel-runtime "^6.22.0" |
||||
|
babel-types "^6.22.0" |
||||
|
babylon "^6.15.0" |
||||
|
debug "^2.2.0" |
||||
|
globals "^9.0.0" |
||||
|
invariant "^2.2.0" |
||||
|
lodash "^4.2.0" |
||||
|
|
||||
|
babel-types@^6.22.0: |
||||
|
version "6.22.0" |
||||
|
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.22.0.tgz#2a447e8d0ea25d2512409e4175479fd78cc8b1db" |
||||
|
dependencies: |
||||
|
babel-runtime "^6.22.0" |
||||
|
esutils "^2.0.2" |
||||
|
lodash "^4.2.0" |
||||
|
to-fast-properties "^1.0.1" |
||||
|
|
||||
|
babylon@^6.11.0, babylon@^6.15.0: |
||||
|
version "6.15.0" |
||||
|
resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" |
||||
|
|
||||
|
balanced-match@^0.4.1: |
||||
|
version "0.4.2" |
||||
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" |
||||
|
|
||||
|
big.js@^3.1.3: |
||||
|
version "3.1.3" |
||||
|
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" |
||||
|
|
||||
|
brace-expansion@^1.0.0: |
||||
|
version "1.1.6" |
||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" |
||||
|
dependencies: |
||||
|
balanced-match "^0.4.1" |
||||
|
concat-map "0.0.1" |
||||
|
|
||||
|
browser-stdout@1.3.0: |
||||
|
version "1.3.0" |
||||
|
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" |
||||
|
|
||||
|
camel-case@^3.0.0: |
||||
|
version "3.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
upper-case "^1.1.1" |
||||
|
|
||||
|
chalk@^1.1.0: |
||||
|
version "1.1.3" |
||||
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" |
||||
|
dependencies: |
||||
|
ansi-styles "^2.2.1" |
||||
|
escape-string-regexp "^1.0.2" |
||||
|
has-ansi "^2.0.0" |
||||
|
strip-ansi "^3.0.0" |
||||
|
supports-color "^2.0.0" |
||||
|
|
||||
|
change-case@^3.0.1: |
||||
|
version "3.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.1.tgz#ee5f5ad0415ad1ad9e8072cf49cd4cfa7660a554" |
||||
|
dependencies: |
||||
|
camel-case "^3.0.0" |
||||
|
constant-case "^2.0.0" |
||||
|
dot-case "^2.1.0" |
||||
|
header-case "^1.0.0" |
||||
|
is-lower-case "^1.1.0" |
||||
|
is-upper-case "^1.1.0" |
||||
|
lower-case "^1.1.1" |
||||
|
lower-case-first "^1.0.0" |
||||
|
no-case "^2.2.0" |
||||
|
param-case "^2.1.0" |
||||
|
pascal-case "^2.0.0" |
||||
|
path-case "^2.1.0" |
||||
|
sentence-case "^2.1.0" |
||||
|
snake-case "^2.1.0" |
||||
|
swap-case "^1.1.0" |
||||
|
title-case "^2.1.0" |
||||
|
upper-case "^1.1.1" |
||||
|
upper-case-first "^1.1.0" |
||||
|
|
||||
|
commander@2.9.0: |
||||
|
version "2.9.0" |
||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" |
||||
|
dependencies: |
||||
|
graceful-readlink ">= 1.0.0" |
||||
|
|
||||
|
commondir@^1.0.1: |
||||
|
version "1.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" |
||||
|
|
||||
|
concat-map@0.0.1: |
||||
|
version "0.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" |
||||
|
|
||||
|
constant-case@^2.0.0: |
||||
|
version "2.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" |
||||
|
dependencies: |
||||
|
snake-case "^2.1.0" |
||||
|
upper-case "^1.1.1" |
||||
|
|
||||
|
convert-source-map@^1.1.0: |
||||
|
version "1.3.0" |
||||
|
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67" |
||||
|
|
||||
|
core-js@^2.4.0: |
||||
|
version "2.4.1" |
||||
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" |
||||
|
|
||||
|
debug@2.2.0, debug@^2.1.1, debug@^2.2.0: |
||||
|
version "2.2.0" |
||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" |
||||
|
dependencies: |
||||
|
ms "0.7.1" |
||||
|
|
||||
|
deepmerge@^1.3.2: |
||||
|
version "1.3.2" |
||||
|
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.3.2.tgz#1663691629d4dbfe364fa12a2a4f0aa86aa3a050" |
||||
|
|
||||
|
detect-indent@^4.0.0: |
||||
|
version "4.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" |
||||
|
dependencies: |
||||
|
repeating "^2.0.0" |
||||
|
|
||||
|
diff@1.4.0: |
||||
|
version "1.4.0" |
||||
|
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" |
||||
|
|
||||
|
dot-case@^2.1.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.0.tgz#4b43dd0d7403c34cb645424add397e80bfe85ca6" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
|
||||
|
emojis-list@^2.0.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" |
||||
|
|
||||
|
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2: |
||||
|
version "1.0.5" |
||||
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" |
||||
|
|
||||
|
esutils@^2.0.2: |
||||
|
version "2.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" |
||||
|
|
||||
|
find-cache-dir@^0.1.1: |
||||
|
version "0.1.1" |
||||
|
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" |
||||
|
dependencies: |
||||
|
commondir "^1.0.1" |
||||
|
mkdirp "^0.5.1" |
||||
|
pkg-dir "^1.0.0" |
||||
|
|
||||
|
find-up@^1.0.0: |
||||
|
version "1.1.2" |
||||
|
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" |
||||
|
dependencies: |
||||
|
path-exists "^2.0.0" |
||||
|
pinkie-promise "^2.0.0" |
||||
|
|
||||
|
fs.realpath@^1.0.0: |
||||
|
version "1.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" |
||||
|
|
||||
|
glob@7.0.5: |
||||
|
version "7.0.5" |
||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" |
||||
|
dependencies: |
||||
|
fs.realpath "^1.0.0" |
||||
|
inflight "^1.0.4" |
||||
|
inherits "2" |
||||
|
minimatch "^3.0.2" |
||||
|
once "^1.3.0" |
||||
|
path-is-absolute "^1.0.0" |
||||
|
|
||||
|
globals@^9.0.0: |
||||
|
version "9.14.0" |
||||
|
resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" |
||||
|
|
||||
|
"graceful-readlink@>= 1.0.0": |
||||
|
version "1.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" |
||||
|
|
||||
|
growl@1.9.2: |
||||
|
version "1.9.2" |
||||
|
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" |
||||
|
|
||||
|
has-ansi@^2.0.0: |
||||
|
version "2.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" |
||||
|
dependencies: |
||||
|
ansi-regex "^2.0.0" |
||||
|
|
||||
|
has-flag@^1.0.0: |
||||
|
version "1.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" |
||||
|
|
||||
|
header-case@^1.0.0: |
||||
|
version "1.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.0.tgz#d9e335909505d56051ec16a0106821889e910781" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
upper-case "^1.1.3" |
||||
|
|
||||
|
home-or-tmp@^2.0.0: |
||||
|
version "2.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" |
||||
|
dependencies: |
||||
|
os-homedir "^1.0.0" |
||||
|
os-tmpdir "^1.0.1" |
||||
|
|
||||
|
inflight@^1.0.4: |
||||
|
version "1.0.6" |
||||
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" |
||||
|
dependencies: |
||||
|
once "^1.3.0" |
||||
|
wrappy "1" |
||||
|
|
||||
|
inherits@2: |
||||
|
version "2.0.3" |
||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" |
||||
|
|
||||
|
invariant@^2.2.0: |
||||
|
version "2.2.2" |
||||
|
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" |
||||
|
dependencies: |
||||
|
loose-envify "^1.0.0" |
||||
|
|
||||
|
is-finite@^1.0.0: |
||||
|
version "1.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" |
||||
|
dependencies: |
||||
|
number-is-nan "^1.0.0" |
||||
|
|
||||
|
is-lower-case@^1.1.0: |
||||
|
version "1.1.3" |
||||
|
resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" |
||||
|
dependencies: |
||||
|
lower-case "^1.1.0" |
||||
|
|
||||
|
is-upper-case@^1.1.0: |
||||
|
version "1.1.2" |
||||
|
resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" |
||||
|
dependencies: |
||||
|
upper-case "^1.1.0" |
||||
|
|
||||
|
js-tokens@^3.0.0: |
||||
|
version "3.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" |
||||
|
|
||||
|
jsesc@^1.3.0: |
||||
|
version "1.3.0" |
||||
|
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" |
||||
|
|
||||
|
json3@3.3.2: |
||||
|
version "3.3.2" |
||||
|
resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" |
||||
|
|
||||
|
json5@^0.5.0: |
||||
|
version "0.5.1" |
||||
|
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" |
||||
|
|
||||
|
loader-utils@^0.2.11: |
||||
|
version "0.2.16" |
||||
|
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" |
||||
|
dependencies: |
||||
|
big.js "^3.1.3" |
||||
|
emojis-list "^2.0.0" |
||||
|
json5 "^0.5.0" |
||||
|
object-assign "^4.0.1" |
||||
|
|
||||
|
lodash._baseassign@^3.0.0: |
||||
|
version "3.2.0" |
||||
|
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" |
||||
|
dependencies: |
||||
|
lodash._basecopy "^3.0.0" |
||||
|
lodash.keys "^3.0.0" |
||||
|
|
||||
|
lodash._basecopy@^3.0.0: |
||||
|
version "3.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" |
||||
|
|
||||
|
lodash._basecreate@^3.0.0: |
||||
|
version "3.0.3" |
||||
|
resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" |
||||
|
|
||||
|
lodash._getnative@^3.0.0: |
||||
|
version "3.9.1" |
||||
|
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" |
||||
|
|
||||
|
lodash._isiterateecall@^3.0.0: |
||||
|
version "3.0.9" |
||||
|
resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" |
||||
|
|
||||
|
lodash.create@3.1.1: |
||||
|
version "3.1.1" |
||||
|
resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" |
||||
|
dependencies: |
||||
|
lodash._baseassign "^3.0.0" |
||||
|
lodash._basecreate "^3.0.0" |
||||
|
lodash._isiterateecall "^3.0.0" |
||||
|
|
||||
|
lodash.isarguments@^3.0.0: |
||||
|
version "3.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" |
||||
|
|
||||
|
lodash.isarray@^3.0.0: |
||||
|
version "3.0.4" |
||||
|
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" |
||||
|
|
||||
|
lodash.keys@^3.0.0: |
||||
|
version "3.1.2" |
||||
|
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" |
||||
|
dependencies: |
||||
|
lodash._getnative "^3.0.0" |
||||
|
lodash.isarguments "^3.0.0" |
||||
|
lodash.isarray "^3.0.0" |
||||
|
|
||||
|
lodash@^4.2.0: |
||||
|
version "4.17.4" |
||||
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" |
||||
|
|
||||
|
loose-envify@^1.0.0: |
||||
|
version "1.3.1" |
||||
|
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" |
||||
|
dependencies: |
||||
|
js-tokens "^3.0.0" |
||||
|
|
||||
|
lower-case-first@^1.0.0: |
||||
|
version "1.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" |
||||
|
dependencies: |
||||
|
lower-case "^1.1.2" |
||||
|
|
||||
|
lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: |
||||
|
version "1.1.3" |
||||
|
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.3.tgz#c92393d976793eee5ba4edb583cf8eae35bd9bfb" |
||||
|
|
||||
|
minimatch@^3.0.2: |
||||
|
version "3.0.3" |
||||
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" |
||||
|
dependencies: |
||||
|
brace-expansion "^1.0.0" |
||||
|
|
||||
|
minimist@0.0.8: |
||||
|
version "0.0.8" |
||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" |
||||
|
|
||||
|
mkdirp@0.5.1, mkdirp@^0.5.1: |
||||
|
version "0.5.1" |
||||
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" |
||||
|
dependencies: |
||||
|
minimist "0.0.8" |
||||
|
|
||||
|
mocha@^3.2.0: |
||||
|
version "3.2.0" |
||||
|
resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.2.0.tgz#7dc4f45e5088075171a68896814e6ae9eb7a85e3" |
||||
|
dependencies: |
||||
|
browser-stdout "1.3.0" |
||||
|
commander "2.9.0" |
||||
|
debug "2.2.0" |
||||
|
diff "1.4.0" |
||||
|
escape-string-regexp "1.0.5" |
||||
|
glob "7.0.5" |
||||
|
growl "1.9.2" |
||||
|
json3 "3.3.2" |
||||
|
lodash.create "3.1.1" |
||||
|
mkdirp "0.5.1" |
||||
|
supports-color "3.1.2" |
||||
|
|
||||
|
ms@0.7.1: |
||||
|
version "0.7.1" |
||||
|
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" |
||||
|
|
||||
|
no-case@^2.2.0: |
||||
|
version "2.3.1" |
||||
|
resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.1.tgz#7aeba1c73a52184265554b7dc03baf720df80081" |
||||
|
dependencies: |
||||
|
lower-case "^1.1.1" |
||||
|
|
||||
|
number-is-nan@^1.0.0: |
||||
|
version "1.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" |
||||
|
|
||||
|
object-assign@^4.0.1: |
||||
|
version "4.1.1" |
||||
|
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" |
||||
|
|
||||
|
once@^1.3.0: |
||||
|
version "1.4.0" |
||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" |
||||
|
dependencies: |
||||
|
wrappy "1" |
||||
|
|
||||
|
os-homedir@^1.0.0: |
||||
|
version "1.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" |
||||
|
|
||||
|
os-tmpdir@^1.0.1: |
||||
|
version "1.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" |
||||
|
|
||||
|
param-case@^2.1.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.0.tgz#2619f90fd6c829ed0b958f1c84ed03a745a6d70a" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
|
||||
|
pascal-case@^2.0.0: |
||||
|
version "2.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.0.tgz#39c248bde5a8dc02d5160696bdb01e044d016ee1" |
||||
|
dependencies: |
||||
|
camel-case "^3.0.0" |
||||
|
upper-case-first "^1.1.0" |
||||
|
|
||||
|
path-case@^2.1.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.0.tgz#5ac491de642936e5dfe0e18d16c461b8be8cf073" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
|
||||
|
path-exists@^2.0.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" |
||||
|
dependencies: |
||||
|
pinkie-promise "^2.0.0" |
||||
|
|
||||
|
path-is-absolute@^1.0.0: |
||||
|
version "1.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" |
||||
|
|
||||
|
pinkie-promise@^2.0.0: |
||||
|
version "2.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" |
||||
|
dependencies: |
||||
|
pinkie "^2.0.0" |
||||
|
|
||||
|
pinkie@^2.0.0: |
||||
|
version "2.0.4" |
||||
|
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" |
||||
|
|
||||
|
pkg-dir@^1.0.0: |
||||
|
version "1.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" |
||||
|
dependencies: |
||||
|
find-up "^1.0.0" |
||||
|
|
||||
|
private@^0.1.6: |
||||
|
version "0.1.7" |
||||
|
resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" |
||||
|
|
||||
|
regenerator-runtime@^0.10.0: |
||||
|
version "0.10.1" |
||||
|
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" |
||||
|
|
||||
|
repeating@^2.0.0: |
||||
|
version "2.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" |
||||
|
dependencies: |
||||
|
is-finite "^1.0.0" |
||||
|
|
||||
|
sentence-case@^2.1.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.0.tgz#d592fbed457fd1a59e3af0ee17e99f6fd70d7efd" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
upper-case-first "^1.1.2" |
||||
|
|
||||
|
slash@^1.0.0: |
||||
|
version "1.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" |
||||
|
|
||||
|
snake-case@^2.1.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
|
||||
|
source-map-support@^0.4.2: |
||||
|
version "0.4.11" |
||||
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322" |
||||
|
dependencies: |
||||
|
source-map "^0.5.3" |
||||
|
|
||||
|
source-map@^0.5.0, source-map@^0.5.3: |
||||
|
version "0.5.6" |
||||
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" |
||||
|
|
||||
|
strip-ansi@^3.0.0: |
||||
|
version "3.0.1" |
||||
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" |
||||
|
dependencies: |
||||
|
ansi-regex "^2.0.0" |
||||
|
|
||||
|
supports-color@3.1.2: |
||||
|
version "3.1.2" |
||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" |
||||
|
dependencies: |
||||
|
has-flag "^1.0.0" |
||||
|
|
||||
|
supports-color@^2.0.0: |
||||
|
version "2.0.0" |
||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" |
||||
|
|
||||
|
swap-case@^1.1.0: |
||||
|
version "1.1.2" |
||||
|
resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" |
||||
|
dependencies: |
||||
|
lower-case "^1.1.1" |
||||
|
upper-case "^1.1.1" |
||||
|
|
||||
|
title-case@^2.1.0: |
||||
|
version "2.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.0.tgz#c68ccb4232079ded64f94b91b4941ade91391979" |
||||
|
dependencies: |
||||
|
no-case "^2.2.0" |
||||
|
upper-case "^1.0.3" |
||||
|
|
||||
|
to-fast-properties@^1.0.1: |
||||
|
version "1.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" |
||||
|
|
||||
|
upper-case-first@^1.1.0, upper-case-first@^1.1.2: |
||||
|
version "1.1.2" |
||||
|
resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" |
||||
|
dependencies: |
||||
|
upper-case "^1.1.1" |
||||
|
|
||||
|
upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: |
||||
|
version "1.1.3" |
||||
|
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" |
||||
|
|
||||
|
webpack-chain@^1.1.0: |
||||
|
version "1.1.0" |
||||
|
resolved "https://registry.yarnpkg.com/webpack-chain/-/webpack-chain-1.1.0.tgz#a1f638c0cee1634dd2233f36aea2d5be500e03e6" |
||||
|
|
||||
|
wrappy@1: |
||||
|
version "1.0.2" |
||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" |
@ -1,373 +0,0 @@ |
|||||
Mozilla Public License Version 2.0 |
|
||||
================================== |
|
||||
|
|
||||
1. Definitions |
|
||||
-------------- |
|
||||
|
|
||||
1.1. "Contributor" |
|
||||
means each individual or legal entity that creates, contributes to |
|
||||
the creation of, or owns Covered Software. |
|
||||
|
|
||||
1.2. "Contributor Version" |
|
||||
means the combination of the Contributions of others (if any) used |
|
||||
by a Contributor and that particular Contributor's Contribution. |
|
||||
|
|
||||
1.3. "Contribution" |
|
||||
means Covered Software of a particular Contributor. |
|
||||
|
|
||||
1.4. "Covered Software" |
|
||||
means Source Code Form to which the initial Contributor has attached |
|
||||
the notice in Exhibit A, the Executable Form of such Source Code |
|
||||
Form, and Modifications of such Source Code Form, in each case |
|
||||
including portions thereof. |
|
||||
|
|
||||
1.5. "Incompatible With Secondary Licenses" |
|
||||
means |
|
||||
|
|
||||
(a) that the initial Contributor has attached the notice described |
|
||||
in Exhibit B to the Covered Software; or |
|
||||
|
|
||||
(b) that the Covered Software was made available under the terms of |
|
||||
version 1.1 or earlier of the License, but not also under the |
|
||||
terms of a Secondary License. |
|
||||
|
|
||||
1.6. "Executable Form" |
|
||||
means any form of the work other than Source Code Form. |
|
||||
|
|
||||
1.7. "Larger Work" |
|
||||
means a work that combines Covered Software with other material, in |
|
||||
a separate file or files, that is not Covered Software. |
|
||||
|
|
||||
1.8. "License" |
|
||||
means this document. |
|
||||
|
|
||||
1.9. "Licensable" |
|
||||
means having the right to grant, to the maximum extent possible, |
|
||||
whether at the time of the initial grant or subsequently, any and |
|
||||
all of the rights conveyed by this License. |
|
||||
|
|
||||
1.10. "Modifications" |
|
||||
means any of the following: |
|
||||
|
|
||||
(a) any file in Source Code Form that results from an addition to, |
|
||||
deletion from, or modification of the contents of Covered |
|
||||
Software; or |
|
||||
|
|
||||
(b) any new file in Source Code Form that contains any Covered |
|
||||
Software. |
|
||||
|
|
||||
1.11. "Patent Claims" of a Contributor |
|
||||
means any patent claim(s), including without limitation, method, |
|
||||
process, and apparatus claims, in any patent Licensable by such |
|
||||
Contributor that would be infringed, but for the grant of the |
|
||||
License, by the making, using, selling, offering for sale, having |
|
||||
made, import, or transfer of either its Contributions or its |
|
||||
Contributor Version. |
|
||||
|
|
||||
1.12. "Secondary License" |
|
||||
means either the GNU General Public License, Version 2.0, the GNU |
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General |
|
||||
Public License, Version 3.0, or any later versions of those |
|
||||
licenses. |
|
||||
|
|
||||
1.13. "Source Code Form" |
|
||||
means the form of the work preferred for making modifications. |
|
||||
|
|
||||
1.14. "You" (or "Your") |
|
||||
means an individual or a legal entity exercising rights under this |
|
||||
License. For legal entities, "You" includes any entity that |
|
||||
controls, is controlled by, or is under common control with You. For |
|
||||
purposes of this definition, "control" means (a) the power, direct |
|
||||
or indirect, to cause the direction or management of such entity, |
|
||||
whether by contract or otherwise, or (b) ownership of more than |
|
||||
fifty percent (50%) of the outstanding shares or beneficial |
|
||||
ownership of such entity. |
|
||||
|
|
||||
2. License Grants and Conditions |
|
||||
-------------------------------- |
|
||||
|
|
||||
2.1. Grants |
|
||||
|
|
||||
Each Contributor hereby grants You a world-wide, royalty-free, |
|
||||
non-exclusive license: |
|
||||
|
|
||||
(a) under intellectual property rights (other than patent or trademark) |
|
||||
Licensable by such Contributor to use, reproduce, make available, |
|
||||
modify, display, perform, distribute, and otherwise exploit its |
|
||||
Contributions, either on an unmodified basis, with Modifications, or |
|
||||
as part of a Larger Work; and |
|
||||
|
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer |
|
||||
for sale, have made, import, and otherwise transfer either its |
|
||||
Contributions or its Contributor Version. |
|
||||
|
|
||||
2.2. Effective Date |
|
||||
|
|
||||
The licenses granted in Section 2.1 with respect to any Contribution |
|
||||
become effective for each Contribution on the date the Contributor first |
|
||||
distributes such Contribution. |
|
||||
|
|
||||
2.3. Limitations on Grant Scope |
|
||||
|
|
||||
The licenses granted in this Section 2 are the only rights granted under |
|
||||
this License. No additional rights or licenses will be implied from the |
|
||||
distribution or licensing of Covered Software under this License. |
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a |
|
||||
Contributor: |
|
||||
|
|
||||
(a) for any code that a Contributor has removed from Covered Software; |
|
||||
or |
|
||||
|
|
||||
(b) for infringements caused by: (i) Your and any other third party's |
|
||||
modifications of Covered Software, or (ii) the combination of its |
|
||||
Contributions with other software (except as part of its Contributor |
|
||||
Version); or |
|
||||
|
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of |
|
||||
its Contributions. |
|
||||
|
|
||||
This License does not grant any rights in the trademarks, service marks, |
|
||||
or logos of any Contributor (except as may be necessary to comply with |
|
||||
the notice requirements in Section 3.4). |
|
||||
|
|
||||
2.4. Subsequent Licenses |
|
||||
|
|
||||
No Contributor makes additional grants as a result of Your choice to |
|
||||
distribute the Covered Software under a subsequent version of this |
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if |
|
||||
permitted under the terms of Section 3.3). |
|
||||
|
|
||||
2.5. Representation |
|
||||
|
|
||||
Each Contributor represents that the Contributor believes its |
|
||||
Contributions are its original creation(s) or it has sufficient rights |
|
||||
to grant the rights to its Contributions conveyed by this License. |
|
||||
|
|
||||
2.6. Fair Use |
|
||||
|
|
||||
This License is not intended to limit any rights You have under |
|
||||
applicable copyright doctrines of fair use, fair dealing, or other |
|
||||
equivalents. |
|
||||
|
|
||||
2.7. Conditions |
|
||||
|
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted |
|
||||
in Section 2.1. |
|
||||
|
|
||||
3. Responsibilities |
|
||||
------------------- |
|
||||
|
|
||||
3.1. Distribution of Source Form |
|
||||
|
|
||||
All distribution of Covered Software in Source Code Form, including any |
|
||||
Modifications that You create or to which You contribute, must be under |
|
||||
the terms of this License. You must inform recipients that the Source |
|
||||
Code Form of the Covered Software is governed by the terms of this |
|
||||
License, and how they can obtain a copy of this License. You may not |
|
||||
attempt to alter or restrict the recipients' rights in the Source Code |
|
||||
Form. |
|
||||
|
|
||||
3.2. Distribution of Executable Form |
|
||||
|
|
||||
If You distribute Covered Software in Executable Form then: |
|
||||
|
|
||||
(a) such Covered Software must also be made available in Source Code |
|
||||
Form, as described in Section 3.1, and You must inform recipients of |
|
||||
the Executable Form how they can obtain a copy of such Source Code |
|
||||
Form by reasonable means in a timely manner, at a charge no more |
|
||||
than the cost of distribution to the recipient; and |
|
||||
|
|
||||
(b) You may distribute such Executable Form under the terms of this |
|
||||
License, or sublicense it under different terms, provided that the |
|
||||
license for the Executable Form does not attempt to limit or alter |
|
||||
the recipients' rights in the Source Code Form under this License. |
|
||||
|
|
||||
3.3. Distribution of a Larger Work |
|
||||
|
|
||||
You may create and distribute a Larger Work under terms of Your choice, |
|
||||
provided that You also comply with the requirements of this License for |
|
||||
the Covered Software. If the Larger Work is a combination of Covered |
|
||||
Software with a work governed by one or more Secondary Licenses, and the |
|
||||
Covered Software is not Incompatible With Secondary Licenses, this |
|
||||
License permits You to additionally distribute such Covered Software |
|
||||
under the terms of such Secondary License(s), so that the recipient of |
|
||||
the Larger Work may, at their option, further distribute the Covered |
|
||||
Software under the terms of either this License or such Secondary |
|
||||
License(s). |
|
||||
|
|
||||
3.4. Notices |
|
||||
|
|
||||
You may not remove or alter the substance of any license notices |
|
||||
(including copyright notices, patent notices, disclaimers of warranty, |
|
||||
or limitations of liability) contained within the Source Code Form of |
|
||||
the Covered Software, except that You may alter any license notices to |
|
||||
the extent required to remedy known factual inaccuracies. |
|
||||
|
|
||||
3.5. Application of Additional Terms |
|
||||
|
|
||||
You may choose to offer, and to charge a fee for, warranty, support, |
|
||||
indemnity or liability obligations to one or more recipients of Covered |
|
||||
Software. However, You may do so only on Your own behalf, and not on |
|
||||
behalf of any Contributor. You must make it absolutely clear that any |
|
||||
such warranty, support, indemnity, or liability obligation is offered by |
|
||||
You alone, and You hereby agree to indemnify every Contributor for any |
|
||||
liability incurred by such Contributor as a result of warranty, support, |
|
||||
indemnity or liability terms You offer. You may include additional |
|
||||
disclaimers of warranty and limitations of liability specific to any |
|
||||
jurisdiction. |
|
||||
|
|
||||
4. Inability to Comply Due to Statute or Regulation |
|
||||
--------------------------------------------------- |
|
||||
|
|
||||
If it is impossible for You to comply with any of the terms of this |
|
||||
License with respect to some or all of the Covered Software due to |
|
||||
statute, judicial order, or regulation then You must: (a) comply with |
|
||||
the terms of this License to the maximum extent possible; and (b) |
|
||||
describe the limitations and the code they affect. Such description must |
|
||||
be placed in a text file included with all distributions of the Covered |
|
||||
Software under this License. Except to the extent prohibited by statute |
|
||||
or regulation, such description must be sufficiently detailed for a |
|
||||
recipient of ordinary skill to be able to understand it. |
|
||||
|
|
||||
5. Termination |
|
||||
-------------- |
|
||||
|
|
||||
5.1. The rights granted under this License will terminate automatically |
|
||||
if You fail to comply with any of its terms. However, if You become |
|
||||
compliant, then the rights granted under this License from a particular |
|
||||
Contributor are reinstated (a) provisionally, unless and until such |
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an |
|
||||
ongoing basis, if such Contributor fails to notify You of the |
|
||||
non-compliance by some reasonable means prior to 60 days after You have |
|
||||
come back into compliance. Moreover, Your grants from a particular |
|
||||
Contributor are reinstated on an ongoing basis if such Contributor |
|
||||
notifies You of the non-compliance by some reasonable means, this is the |
|
||||
first time You have received notice of non-compliance with this License |
|
||||
from such Contributor, and You become compliant prior to 30 days after |
|
||||
Your receipt of the notice. |
|
||||
|
|
||||
5.2. If You initiate litigation against any entity by asserting a patent |
|
||||
infringement claim (excluding declaratory judgment actions, |
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version |
|
||||
directly or indirectly infringes any patent, then the rights granted to |
|
||||
You by any and all Contributors for the Covered Software under Section |
|
||||
2.1 of this License shall terminate. |
|
||||
|
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all |
|
||||
end user license agreements (excluding distributors and resellers) which |
|
||||
have been validly granted by You or Your distributors under this License |
|
||||
prior to termination shall survive termination. |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 6. Disclaimer of Warranty * |
|
||||
* ------------------------- * |
|
||||
* * |
|
||||
* Covered Software is provided under this License on an "as is" * |
|
||||
* basis, without warranty of any kind, either expressed, implied, or * |
|
||||
* statutory, including, without limitation, warranties that the * |
|
||||
* Covered Software is free of defects, merchantable, fit for a * |
|
||||
* particular purpose or non-infringing. The entire risk as to the * |
|
||||
* quality and performance of the Covered Software is with You. * |
|
||||
* Should any Covered Software prove defective in any respect, You * |
|
||||
* (not any Contributor) assume the cost of any necessary servicing, * |
|
||||
* repair, or correction. This disclaimer of warranty constitutes an * |
|
||||
* essential part of this License. No use of any Covered Software is * |
|
||||
* authorized under this License except under this disclaimer. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 7. Limitation of Liability * |
|
||||
* -------------------------- * |
|
||||
* * |
|
||||
* Under no circumstances and under no legal theory, whether tort * |
|
||||
* (including negligence), contract, or otherwise, shall any * |
|
||||
* Contributor, or anyone who distributes Covered Software as * |
|
||||
* permitted above, be liable to You for any direct, indirect, * |
|
||||
* special, incidental, or consequential damages of any character * |
|
||||
* including, without limitation, damages for lost profits, loss of * |
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any * |
|
||||
* and all other commercial damages or losses, even if such party * |
|
||||
* shall have been informed of the possibility of such damages. This * |
|
||||
* limitation of liability shall not apply to liability for death or * |
|
||||
* personal injury resulting from such party's negligence to the * |
|
||||
* extent applicable law prohibits such limitation. Some * |
|
||||
* jurisdictions do not allow the exclusion or limitation of * |
|
||||
* incidental or consequential damages, so this exclusion and * |
|
||||
* limitation may not apply to You. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
8. Litigation |
|
||||
------------- |
|
||||
|
|
||||
Any litigation relating to this License may be brought only in the |
|
||||
courts of a jurisdiction where the defendant maintains its principal |
|
||||
place of business and such litigation shall be governed by laws of that |
|
||||
jurisdiction, without reference to its conflict-of-law provisions. |
|
||||
Nothing in this Section shall prevent a party's ability to bring |
|
||||
cross-claims or counter-claims. |
|
||||
|
|
||||
9. Miscellaneous |
|
||||
---------------- |
|
||||
|
|
||||
This License represents the complete agreement concerning the subject |
|
||||
matter hereof. If any provision of this License is held to be |
|
||||
unenforceable, such provision shall be reformed only to the extent |
|
||||
necessary to make it enforceable. Any law or regulation which provides |
|
||||
that the language of a contract shall be construed against the drafter |
|
||||
shall not be used to construe this License against a Contributor. |
|
||||
|
|
||||
10. Versions of the License |
|
||||
--------------------------- |
|
||||
|
|
||||
10.1. New Versions |
|
||||
|
|
||||
Mozilla Foundation is the license steward. Except as provided in Section |
|
||||
10.3, no one other than the license steward has the right to modify or |
|
||||
publish new versions of this License. Each version will be given a |
|
||||
distinguishing version number. |
|
||||
|
|
||||
10.2. Effect of New Versions |
|
||||
|
|
||||
You may distribute the Covered Software under the terms of the version |
|
||||
of the License under which You originally received the Covered Software, |
|
||||
or under the terms of any subsequent version published by the license |
|
||||
steward. |
|
||||
|
|
||||
10.3. Modified Versions |
|
||||
|
|
||||
If you create software not governed by this License, and you want to |
|
||||
create a new license for such software, you may create and use a |
|
||||
modified version of this License if you rename the license and remove |
|
||||
any references to the name of the license steward (except to note that |
|
||||
such modified license differs from this License). |
|
||||
|
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary |
|
||||
Licenses |
|
||||
|
|
||||
If You choose to distribute Source Code Form that is Incompatible With |
|
||||
Secondary Licenses under the terms of this version of the License, the |
|
||||
notice described in Exhibit B of this License must be attached. |
|
||||
|
|
||||
Exhibit A - Source Code Form License Notice |
|
||||
------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is subject to the terms of the Mozilla Public |
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this |
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
||||
|
|
||||
If it is not possible or desirable to put the notice in a particular |
|
||||
file, then You may include the notice in a location (such as a LICENSE |
|
||||
file in a relevant directory) where a recipient would be likely to look |
|
||||
for such a notice. |
|
||||
|
|
||||
You may add additional accurate notices of copyright ownership. |
|
||||
|
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice |
|
||||
--------------------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as |
|
||||
defined by the Mozilla Public License, v. 2.0. |
|
@ -1,105 +1,120 @@ |
|||||
'use strict'; |
'use strict'; |
||||
|
|
||||
const config = require('neutrino-preset-base'); |
const base = require('neutrino-preset-base'); |
||||
const nodeExternals = require('webpack-node-externals'); |
const nodeExternals = require('webpack-node-externals'); |
||||
const path = require('path'); |
const path = require('path'); |
||||
const webpack = require('webpack'); |
const webpack = require('webpack'); |
||||
const merge = require('deepmerge'); |
const merge = require('deepmerge'); |
||||
|
|
||||
|
const CWD = process.cwd(); |
||||
|
const SRC = path.join(CWD, 'src'); |
||||
|
const TEST = path.join(CWD, 'test'); |
||||
const MODULES = path.join(__dirname, '../node_modules'); |
const MODULES = path.join(__dirname, '../node_modules'); |
||||
|
|
||||
config |
module.exports = neutrino => { |
||||
.target('node') |
return neutrino.extend(base, config => { |
||||
.devtool('source-map') |
config |
||||
.externals([nodeExternals()]) |
.target('node') |
||||
.node |
.devtool('source-map') |
||||
.set('__filename', false) |
.externals([nodeExternals()]) |
||||
.set('__dirname', false) |
.node |
||||
.end() |
.set('__filename', false) |
||||
.output |
.set('__dirname', false) |
||||
.filename('[name].js') |
.end() |
||||
.libraryTarget('commonjs2'); |
.output |
||||
|
.filename('[name].js') |
||||
config.resolve.modules.add(MODULES); |
.libraryTarget('commonjs2'); |
||||
config.resolveLoader.modules.add(MODULES); |
|
||||
|
config.resolve.modules.add(MODULES); |
||||
config |
config.resolveLoader.modules.add(MODULES); |
||||
.plugin('options') |
|
||||
.use(webpack.LoaderOptionsPlugin, { |
config |
||||
emitError: true, |
.plugin('banner') |
||||
failOnError: true, |
.use(webpack.BannerPlugin, { |
||||
mocha: { |
banner: `require(${require.resolve('source-map-support')}).install();`, |
||||
reporter: 'spec', |
raw: true, |
||||
ui: 'tdd', |
entryOnly: true |
||||
bail: true |
}); |
||||
} |
|
||||
}); |
config.options.set('performance', { |
||||
|
hints: false |
||||
config |
}); |
||||
.plugin('banner') |
|
||||
.use(webpack.BannerPlugin, { |
config |
||||
banner: `require('source-map-support').install();`, |
.module |
||||
raw: true, |
.rule('compile') |
||||
entryOnly: true |
.test(/\.js$/) |
||||
}); |
.include(SRC, TEST) |
||||
|
.loader('babel', require.resolve('babel-loader'), { |
||||
config.options.set('performance', { |
presets: [ |
||||
hints: false |
[ |
||||
}); |
require.resolve('babel-preset-env'), |
||||
|
{ |
||||
config.module |
modules: false, |
||||
.rule('compile') |
include: 'transform-regenerator', |
||||
.loader('babel', ({ options }) => { |
targets: { |
||||
options.presets[0][1].targets.node = 6.9; |
node: 6.9 |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
], |
||||
|
plugins: [], |
||||
|
env: { |
||||
|
test: { |
||||
|
plugins: [ |
||||
|
// FIXME: This currently breaks the coverage
|
||||
|
//[require.resolve('babel-plugin-istanbul'), { exclude: ['test/**/*'] }]
|
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
return { options }; |
config.module |
||||
}); |
.rule('lint') |
||||
|
.loader('eslint', ({ options }) => { |
||||
|
return { |
||||
|
options: merge(options, { |
||||
|
envs: ['node'], |
||||
|
rules: { |
||||
|
// enforce return after a callback
|
||||
|
'callback-return': 'off', |
||||
|
|
||||
config.module |
// require all requires be top-level
|
||||
.rule('lint') |
// http://eslint.org/docs/rules/global-require
|
||||
.loader('eslint', ({ options }) => { |
'global-require': 'error', |
||||
return { |
|
||||
options: merge(options, { |
|
||||
envs: ['node'], |
|
||||
rules: { |
|
||||
// enforce return after a callback
|
|
||||
'callback-return': 'off', |
|
||||
|
|
||||
// require all requires be top-level
|
// enforces error handling in callbacks (node environment)
|
||||
// http://eslint.org/docs/rules/global-require
|
'handle-callback-err': 'off', |
||||
'global-require': 'error', |
|
||||
|
|
||||
// enforces error handling in callbacks (node environment)
|
// Allow console in Node.js
|
||||
'handle-callback-err': 'off', |
'no-console': 'off', |
||||
|
|
||||
// Allow console in Node.js
|
// disallow mixing regular variable and require declarations
|
||||
'no-console': 'off', |
'no-mixed-requires': ['off', false], |
||||
|
|
||||
// disallow mixing regular variable and require declarations
|
// disallow use of new operator with the require function
|
||||
'no-mixed-requires': ['off', false], |
'no-new-require': 'error', |
||||
|
|
||||
// disallow use of new operator with the require function
|
// disallow string concatenation with __dirname and __filename
|
||||
'no-new-require': 'error', |
// http://eslint.org/docs/rules/no-path-concat
|
||||
|
'no-path-concat': 'error', |
||||
|
|
||||
// disallow string concatenation with __dirname and __filename
|
// disallow use of process.env
|
||||
// http://eslint.org/docs/rules/no-path-concat
|
'no-process-env': 'off', |
||||
'no-path-concat': 'error', |
|
||||
|
|
||||
// disallow use of process.env
|
// disallow process.exit()
|
||||
'no-process-env': 'off', |
'no-process-exit': 'off', |
||||
|
|
||||
// disallow process.exit()
|
// restrict usage of specified node modules
|
||||
'no-process-exit': 'off', |
'no-restricted-modules': 'off', |
||||
|
|
||||
// restrict usage of specified node modules
|
// disallow use of synchronous methods (off by default)
|
||||
'no-restricted-modules': 'off', |
'no-sync': 'off' |
||||
|
} |
||||
|
}) |
||||
|
}; |
||||
|
}); |
||||
|
|
||||
// disallow use of synchronous methods (off by default)
|
return config; |
||||
'no-sync': 'off' |
|
||||
} |
|
||||
}) |
|
||||
}; |
|
||||
}); |
}); |
||||
|
}; |
||||
|
|
||||
module.exports = config; |
|
||||
|
@ -1,373 +0,0 @@ |
|||||
Mozilla Public License Version 2.0 |
|
||||
================================== |
|
||||
|
|
||||
1. Definitions |
|
||||
-------------- |
|
||||
|
|
||||
1.1. "Contributor" |
|
||||
means each individual or legal entity that creates, contributes to |
|
||||
the creation of, or owns Covered Software. |
|
||||
|
|
||||
1.2. "Contributor Version" |
|
||||
means the combination of the Contributions of others (if any) used |
|
||||
by a Contributor and that particular Contributor's Contribution. |
|
||||
|
|
||||
1.3. "Contribution" |
|
||||
means Covered Software of a particular Contributor. |
|
||||
|
|
||||
1.4. "Covered Software" |
|
||||
means Source Code Form to which the initial Contributor has attached |
|
||||
the notice in Exhibit A, the Executable Form of such Source Code |
|
||||
Form, and Modifications of such Source Code Form, in each case |
|
||||
including portions thereof. |
|
||||
|
|
||||
1.5. "Incompatible With Secondary Licenses" |
|
||||
means |
|
||||
|
|
||||
(a) that the initial Contributor has attached the notice described |
|
||||
in Exhibit B to the Covered Software; or |
|
||||
|
|
||||
(b) that the Covered Software was made available under the terms of |
|
||||
version 1.1 or earlier of the License, but not also under the |
|
||||
terms of a Secondary License. |
|
||||
|
|
||||
1.6. "Executable Form" |
|
||||
means any form of the work other than Source Code Form. |
|
||||
|
|
||||
1.7. "Larger Work" |
|
||||
means a work that combines Covered Software with other material, in |
|
||||
a separate file or files, that is not Covered Software. |
|
||||
|
|
||||
1.8. "License" |
|
||||
means this document. |
|
||||
|
|
||||
1.9. "Licensable" |
|
||||
means having the right to grant, to the maximum extent possible, |
|
||||
whether at the time of the initial grant or subsequently, any and |
|
||||
all of the rights conveyed by this License. |
|
||||
|
|
||||
1.10. "Modifications" |
|
||||
means any of the following: |
|
||||
|
|
||||
(a) any file in Source Code Form that results from an addition to, |
|
||||
deletion from, or modification of the contents of Covered |
|
||||
Software; or |
|
||||
|
|
||||
(b) any new file in Source Code Form that contains any Covered |
|
||||
Software. |
|
||||
|
|
||||
1.11. "Patent Claims" of a Contributor |
|
||||
means any patent claim(s), including without limitation, method, |
|
||||
process, and apparatus claims, in any patent Licensable by such |
|
||||
Contributor that would be infringed, but for the grant of the |
|
||||
License, by the making, using, selling, offering for sale, having |
|
||||
made, import, or transfer of either its Contributions or its |
|
||||
Contributor Version. |
|
||||
|
|
||||
1.12. "Secondary License" |
|
||||
means either the GNU General Public License, Version 2.0, the GNU |
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General |
|
||||
Public License, Version 3.0, or any later versions of those |
|
||||
licenses. |
|
||||
|
|
||||
1.13. "Source Code Form" |
|
||||
means the form of the work preferred for making modifications. |
|
||||
|
|
||||
1.14. "You" (or "Your") |
|
||||
means an individual or a legal entity exercising rights under this |
|
||||
License. For legal entities, "You" includes any entity that |
|
||||
controls, is controlled by, or is under common control with You. For |
|
||||
purposes of this definition, "control" means (a) the power, direct |
|
||||
or indirect, to cause the direction or management of such entity, |
|
||||
whether by contract or otherwise, or (b) ownership of more than |
|
||||
fifty percent (50%) of the outstanding shares or beneficial |
|
||||
ownership of such entity. |
|
||||
|
|
||||
2. License Grants and Conditions |
|
||||
-------------------------------- |
|
||||
|
|
||||
2.1. Grants |
|
||||
|
|
||||
Each Contributor hereby grants You a world-wide, royalty-free, |
|
||||
non-exclusive license: |
|
||||
|
|
||||
(a) under intellectual property rights (other than patent or trademark) |
|
||||
Licensable by such Contributor to use, reproduce, make available, |
|
||||
modify, display, perform, distribute, and otherwise exploit its |
|
||||
Contributions, either on an unmodified basis, with Modifications, or |
|
||||
as part of a Larger Work; and |
|
||||
|
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer |
|
||||
for sale, have made, import, and otherwise transfer either its |
|
||||
Contributions or its Contributor Version. |
|
||||
|
|
||||
2.2. Effective Date |
|
||||
|
|
||||
The licenses granted in Section 2.1 with respect to any Contribution |
|
||||
become effective for each Contribution on the date the Contributor first |
|
||||
distributes such Contribution. |
|
||||
|
|
||||
2.3. Limitations on Grant Scope |
|
||||
|
|
||||
The licenses granted in this Section 2 are the only rights granted under |
|
||||
this License. No additional rights or licenses will be implied from the |
|
||||
distribution or licensing of Covered Software under this License. |
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a |
|
||||
Contributor: |
|
||||
|
|
||||
(a) for any code that a Contributor has removed from Covered Software; |
|
||||
or |
|
||||
|
|
||||
(b) for infringements caused by: (i) Your and any other third party's |
|
||||
modifications of Covered Software, or (ii) the combination of its |
|
||||
Contributions with other software (except as part of its Contributor |
|
||||
Version); or |
|
||||
|
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of |
|
||||
its Contributions. |
|
||||
|
|
||||
This License does not grant any rights in the trademarks, service marks, |
|
||||
or logos of any Contributor (except as may be necessary to comply with |
|
||||
the notice requirements in Section 3.4). |
|
||||
|
|
||||
2.4. Subsequent Licenses |
|
||||
|
|
||||
No Contributor makes additional grants as a result of Your choice to |
|
||||
distribute the Covered Software under a subsequent version of this |
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if |
|
||||
permitted under the terms of Section 3.3). |
|
||||
|
|
||||
2.5. Representation |
|
||||
|
|
||||
Each Contributor represents that the Contributor believes its |
|
||||
Contributions are its original creation(s) or it has sufficient rights |
|
||||
to grant the rights to its Contributions conveyed by this License. |
|
||||
|
|
||||
2.6. Fair Use |
|
||||
|
|
||||
This License is not intended to limit any rights You have under |
|
||||
applicable copyright doctrines of fair use, fair dealing, or other |
|
||||
equivalents. |
|
||||
|
|
||||
2.7. Conditions |
|
||||
|
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted |
|
||||
in Section 2.1. |
|
||||
|
|
||||
3. Responsibilities |
|
||||
------------------- |
|
||||
|
|
||||
3.1. Distribution of Source Form |
|
||||
|
|
||||
All distribution of Covered Software in Source Code Form, including any |
|
||||
Modifications that You create or to which You contribute, must be under |
|
||||
the terms of this License. You must inform recipients that the Source |
|
||||
Code Form of the Covered Software is governed by the terms of this |
|
||||
License, and how they can obtain a copy of this License. You may not |
|
||||
attempt to alter or restrict the recipients' rights in the Source Code |
|
||||
Form. |
|
||||
|
|
||||
3.2. Distribution of Executable Form |
|
||||
|
|
||||
If You distribute Covered Software in Executable Form then: |
|
||||
|
|
||||
(a) such Covered Software must also be made available in Source Code |
|
||||
Form, as described in Section 3.1, and You must inform recipients of |
|
||||
the Executable Form how they can obtain a copy of such Source Code |
|
||||
Form by reasonable means in a timely manner, at a charge no more |
|
||||
than the cost of distribution to the recipient; and |
|
||||
|
|
||||
(b) You may distribute such Executable Form under the terms of this |
|
||||
License, or sublicense it under different terms, provided that the |
|
||||
license for the Executable Form does not attempt to limit or alter |
|
||||
the recipients' rights in the Source Code Form under this License. |
|
||||
|
|
||||
3.3. Distribution of a Larger Work |
|
||||
|
|
||||
You may create and distribute a Larger Work under terms of Your choice, |
|
||||
provided that You also comply with the requirements of this License for |
|
||||
the Covered Software. If the Larger Work is a combination of Covered |
|
||||
Software with a work governed by one or more Secondary Licenses, and the |
|
||||
Covered Software is not Incompatible With Secondary Licenses, this |
|
||||
License permits You to additionally distribute such Covered Software |
|
||||
under the terms of such Secondary License(s), so that the recipient of |
|
||||
the Larger Work may, at their option, further distribute the Covered |
|
||||
Software under the terms of either this License or such Secondary |
|
||||
License(s). |
|
||||
|
|
||||
3.4. Notices |
|
||||
|
|
||||
You may not remove or alter the substance of any license notices |
|
||||
(including copyright notices, patent notices, disclaimers of warranty, |
|
||||
or limitations of liability) contained within the Source Code Form of |
|
||||
the Covered Software, except that You may alter any license notices to |
|
||||
the extent required to remedy known factual inaccuracies. |
|
||||
|
|
||||
3.5. Application of Additional Terms |
|
||||
|
|
||||
You may choose to offer, and to charge a fee for, warranty, support, |
|
||||
indemnity or liability obligations to one or more recipients of Covered |
|
||||
Software. However, You may do so only on Your own behalf, and not on |
|
||||
behalf of any Contributor. You must make it absolutely clear that any |
|
||||
such warranty, support, indemnity, or liability obligation is offered by |
|
||||
You alone, and You hereby agree to indemnify every Contributor for any |
|
||||
liability incurred by such Contributor as a result of warranty, support, |
|
||||
indemnity or liability terms You offer. You may include additional |
|
||||
disclaimers of warranty and limitations of liability specific to any |
|
||||
jurisdiction. |
|
||||
|
|
||||
4. Inability to Comply Due to Statute or Regulation |
|
||||
--------------------------------------------------- |
|
||||
|
|
||||
If it is impossible for You to comply with any of the terms of this |
|
||||
License with respect to some or all of the Covered Software due to |
|
||||
statute, judicial order, or regulation then You must: (a) comply with |
|
||||
the terms of this License to the maximum extent possible; and (b) |
|
||||
describe the limitations and the code they affect. Such description must |
|
||||
be placed in a text file included with all distributions of the Covered |
|
||||
Software under this License. Except to the extent prohibited by statute |
|
||||
or regulation, such description must be sufficiently detailed for a |
|
||||
recipient of ordinary skill to be able to understand it. |
|
||||
|
|
||||
5. Termination |
|
||||
-------------- |
|
||||
|
|
||||
5.1. The rights granted under this License will terminate automatically |
|
||||
if You fail to comply with any of its terms. However, if You become |
|
||||
compliant, then the rights granted under this License from a particular |
|
||||
Contributor are reinstated (a) provisionally, unless and until such |
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an |
|
||||
ongoing basis, if such Contributor fails to notify You of the |
|
||||
non-compliance by some reasonable means prior to 60 days after You have |
|
||||
come back into compliance. Moreover, Your grants from a particular |
|
||||
Contributor are reinstated on an ongoing basis if such Contributor |
|
||||
notifies You of the non-compliance by some reasonable means, this is the |
|
||||
first time You have received notice of non-compliance with this License |
|
||||
from such Contributor, and You become compliant prior to 30 days after |
|
||||
Your receipt of the notice. |
|
||||
|
|
||||
5.2. If You initiate litigation against any entity by asserting a patent |
|
||||
infringement claim (excluding declaratory judgment actions, |
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version |
|
||||
directly or indirectly infringes any patent, then the rights granted to |
|
||||
You by any and all Contributors for the Covered Software under Section |
|
||||
2.1 of this License shall terminate. |
|
||||
|
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all |
|
||||
end user license agreements (excluding distributors and resellers) which |
|
||||
have been validly granted by You or Your distributors under this License |
|
||||
prior to termination shall survive termination. |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 6. Disclaimer of Warranty * |
|
||||
* ------------------------- * |
|
||||
* * |
|
||||
* Covered Software is provided under this License on an "as is" * |
|
||||
* basis, without warranty of any kind, either expressed, implied, or * |
|
||||
* statutory, including, without limitation, warranties that the * |
|
||||
* Covered Software is free of defects, merchantable, fit for a * |
|
||||
* particular purpose or non-infringing. The entire risk as to the * |
|
||||
* quality and performance of the Covered Software is with You. * |
|
||||
* Should any Covered Software prove defective in any respect, You * |
|
||||
* (not any Contributor) assume the cost of any necessary servicing, * |
|
||||
* repair, or correction. This disclaimer of warranty constitutes an * |
|
||||
* essential part of this License. No use of any Covered Software is * |
|
||||
* authorized under this License except under this disclaimer. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 7. Limitation of Liability * |
|
||||
* -------------------------- * |
|
||||
* * |
|
||||
* Under no circumstances and under no legal theory, whether tort * |
|
||||
* (including negligence), contract, or otherwise, shall any * |
|
||||
* Contributor, or anyone who distributes Covered Software as * |
|
||||
* permitted above, be liable to You for any direct, indirect, * |
|
||||
* special, incidental, or consequential damages of any character * |
|
||||
* including, without limitation, damages for lost profits, loss of * |
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any * |
|
||||
* and all other commercial damages or losses, even if such party * |
|
||||
* shall have been informed of the possibility of such damages. This * |
|
||||
* limitation of liability shall not apply to liability for death or * |
|
||||
* personal injury resulting from such party's negligence to the * |
|
||||
* extent applicable law prohibits such limitation. Some * |
|
||||
* jurisdictions do not allow the exclusion or limitation of * |
|
||||
* incidental or consequential damages, so this exclusion and * |
|
||||
* limitation may not apply to You. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
8. Litigation |
|
||||
------------- |
|
||||
|
|
||||
Any litigation relating to this License may be brought only in the |
|
||||
courts of a jurisdiction where the defendant maintains its principal |
|
||||
place of business and such litigation shall be governed by laws of that |
|
||||
jurisdiction, without reference to its conflict-of-law provisions. |
|
||||
Nothing in this Section shall prevent a party's ability to bring |
|
||||
cross-claims or counter-claims. |
|
||||
|
|
||||
9. Miscellaneous |
|
||||
---------------- |
|
||||
|
|
||||
This License represents the complete agreement concerning the subject |
|
||||
matter hereof. If any provision of this License is held to be |
|
||||
unenforceable, such provision shall be reformed only to the extent |
|
||||
necessary to make it enforceable. Any law or regulation which provides |
|
||||
that the language of a contract shall be construed against the drafter |
|
||||
shall not be used to construe this License against a Contributor. |
|
||||
|
|
||||
10. Versions of the License |
|
||||
--------------------------- |
|
||||
|
|
||||
10.1. New Versions |
|
||||
|
|
||||
Mozilla Foundation is the license steward. Except as provided in Section |
|
||||
10.3, no one other than the license steward has the right to modify or |
|
||||
publish new versions of this License. Each version will be given a |
|
||||
distinguishing version number. |
|
||||
|
|
||||
10.2. Effect of New Versions |
|
||||
|
|
||||
You may distribute the Covered Software under the terms of the version |
|
||||
of the License under which You originally received the Covered Software, |
|
||||
or under the terms of any subsequent version published by the license |
|
||||
steward. |
|
||||
|
|
||||
10.3. Modified Versions |
|
||||
|
|
||||
If you create software not governed by this License, and you want to |
|
||||
create a new license for such software, you may create and use a |
|
||||
modified version of this License if you rename the license and remove |
|
||||
any references to the name of the license steward (except to note that |
|
||||
such modified license differs from this License). |
|
||||
|
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary |
|
||||
Licenses |
|
||||
|
|
||||
If You choose to distribute Source Code Form that is Incompatible With |
|
||||
Secondary Licenses under the terms of this version of the License, the |
|
||||
notice described in Exhibit B of this License must be attached. |
|
||||
|
|
||||
Exhibit A - Source Code Form License Notice |
|
||||
------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is subject to the terms of the Mozilla Public |
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this |
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
||||
|
|
||||
If it is not possible or desirable to put the notice in a particular |
|
||||
file, then You may include the notice in a location (such as a LICENSE |
|
||||
file in a relevant directory) where a recipient would be likely to look |
|
||||
for such a notice. |
|
||||
|
|
||||
You may add additional accurate notices of copyright ownership. |
|
||||
|
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice |
|
||||
--------------------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as |
|
||||
defined by the Mozilla Public License, v. 2.0. |
|
@ -1,75 +1,82 @@ |
|||||
'use strict'; |
'use strict'; |
||||
|
|
||||
const config = require('neutrino-preset-web'); |
const web = require('neutrino-preset-web'); |
||||
const merge = require('deepmerge'); |
const merge = require('deepmerge'); |
||||
const path = require('path'); |
const path = require('path'); |
||||
const webpack = require('webpack'); |
const webpack = require('webpack'); |
||||
|
|
||||
const MODULES = path.join(__dirname, '../node_modules'); |
const MODULES = path.join(__dirname, '../node_modules'); |
||||
|
|
||||
// modify lint rule and loader
|
|
||||
config.module |
|
||||
.rule('lint') |
|
||||
.test(/\.jsx?$/) |
|
||||
.loader('eslint', ({ options }) => { |
|
||||
return { |
|
||||
options: merge(options, { |
|
||||
plugins: ['react'], |
|
||||
baseConfig: { |
|
||||
extends: ['plugin:react/recommended'] |
|
||||
}, |
|
||||
parserOptions: { |
|
||||
ecmaFeatures: { |
|
||||
experimentalObjectRestSpread: true |
|
||||
} |
|
||||
}, |
|
||||
rules: { |
|
||||
'react/prop-types': ['off'], |
|
||||
'jsx-quotes': ['error', 'prefer-double'] |
|
||||
} |
|
||||
}) |
|
||||
}; |
|
||||
}); |
|
||||
|
|
||||
// modify babel rule and loader
|
|
||||
config.module |
|
||||
.rule('compile') |
|
||||
.test(/\.jsx?$/) |
|
||||
.loader('babel', ({ options }) => { |
|
||||
if (process.env.NODE_ENV === 'development') { |
|
||||
options.plugins.push(require.resolve('react-hot-loader/babel')); |
|
||||
} |
|
||||
|
|
||||
return { |
module.exports = neutrino => { |
||||
options: merge(options, { |
return neutrino.extend(web, config => { |
||||
presets: [ |
// modify lint rule and loader
|
||||
require.resolve('babel-preset-stage-0'), |
config.module |
||||
require.resolve('babel-preset-react') |
.rule('lint') |
||||
] |
.test(/\.jsx?$/) |
||||
}) |
.loader('eslint', ({ options }) => { |
||||
}; |
return { |
||||
}); |
options: merge(options, { |
||||
|
plugins: ['react'], |
||||
|
baseConfig: { |
||||
|
extends: ['plugin:react/recommended'] |
||||
|
}, |
||||
|
parserOptions: { |
||||
|
ecmaFeatures: { |
||||
|
experimentalObjectRestSpread: true |
||||
|
} |
||||
|
}, |
||||
|
rules: { |
||||
|
'react/prop-types': ['off'], |
||||
|
'jsx-quotes': ['error', 'prefer-double'] |
||||
|
} |
||||
|
}) |
||||
|
}; |
||||
|
}); |
||||
|
|
||||
|
config.module |
||||
|
.rule('compile') |
||||
|
.test(/\.jsx?$/) |
||||
|
.loader('babel', ({ options }) => { |
||||
|
if (process.env.NODE_ENV === 'development') { |
||||
|
options.plugins.push(require.resolve('react-hot-loader/babel')); |
||||
|
} |
||||
|
|
||||
config.resolve |
return { |
||||
.modules |
options: merge(options, { |
||||
.add(MODULES) |
presets: [ |
||||
.end() |
require.resolve('babel-preset-react') |
||||
.extensions |
], |
||||
.add('.jsx'); |
plugins: [ |
||||
|
require.resolve('babel-plugin-transform-object-rest-spread') |
||||
|
] |
||||
|
}) |
||||
|
}; |
||||
|
}); |
||||
|
|
||||
config.resolveLoader.modules.add(MODULES); |
config.resolve |
||||
|
.modules |
||||
|
.add(MODULES) |
||||
|
.end() |
||||
|
.extensions |
||||
|
.add('.jsx'); |
||||
|
|
||||
config |
config.resolveLoader.modules.add(MODULES); |
||||
.externals({ |
|
||||
'react/addons': true, |
config |
||||
'react/lib/ExecutionEnvironment': true, |
.externals({ |
||||
'react/lib/ReactContext': 'window' |
'react/addons': true, |
||||
}); |
'react/lib/ExecutionEnvironment': true, |
||||
|
'react/lib/ReactContext': 'window' |
||||
|
}); |
||||
|
|
||||
if (process.env.NODE_ENV === 'development') { |
if (process.env.NODE_ENV === 'development') { |
||||
config |
config |
||||
.entry('index') |
.entry('index') |
||||
.add(require.resolve('react-hot-loader/patch')); |
.prepend(require.resolve('react-hot-loader/patch')); |
||||
} |
} |
||||
|
|
||||
module.exports = config; |
return config; |
||||
|
}); |
||||
|
}; |
||||
|
@ -1,373 +0,0 @@ |
|||||
Mozilla Public License Version 2.0 |
|
||||
================================== |
|
||||
|
|
||||
1. Definitions |
|
||||
-------------- |
|
||||
|
|
||||
1.1. "Contributor" |
|
||||
means each individual or legal entity that creates, contributes to |
|
||||
the creation of, or owns Covered Software. |
|
||||
|
|
||||
1.2. "Contributor Version" |
|
||||
means the combination of the Contributions of others (if any) used |
|
||||
by a Contributor and that particular Contributor's Contribution. |
|
||||
|
|
||||
1.3. "Contribution" |
|
||||
means Covered Software of a particular Contributor. |
|
||||
|
|
||||
1.4. "Covered Software" |
|
||||
means Source Code Form to which the initial Contributor has attached |
|
||||
the notice in Exhibit A, the Executable Form of such Source Code |
|
||||
Form, and Modifications of such Source Code Form, in each case |
|
||||
including portions thereof. |
|
||||
|
|
||||
1.5. "Incompatible With Secondary Licenses" |
|
||||
means |
|
||||
|
|
||||
(a) that the initial Contributor has attached the notice described |
|
||||
in Exhibit B to the Covered Software; or |
|
||||
|
|
||||
(b) that the Covered Software was made available under the terms of |
|
||||
version 1.1 or earlier of the License, but not also under the |
|
||||
terms of a Secondary License. |
|
||||
|
|
||||
1.6. "Executable Form" |
|
||||
means any form of the work other than Source Code Form. |
|
||||
|
|
||||
1.7. "Larger Work" |
|
||||
means a work that combines Covered Software with other material, in |
|
||||
a separate file or files, that is not Covered Software. |
|
||||
|
|
||||
1.8. "License" |
|
||||
means this document. |
|
||||
|
|
||||
1.9. "Licensable" |
|
||||
means having the right to grant, to the maximum extent possible, |
|
||||
whether at the time of the initial grant or subsequently, any and |
|
||||
all of the rights conveyed by this License. |
|
||||
|
|
||||
1.10. "Modifications" |
|
||||
means any of the following: |
|
||||
|
|
||||
(a) any file in Source Code Form that results from an addition to, |
|
||||
deletion from, or modification of the contents of Covered |
|
||||
Software; or |
|
||||
|
|
||||
(b) any new file in Source Code Form that contains any Covered |
|
||||
Software. |
|
||||
|
|
||||
1.11. "Patent Claims" of a Contributor |
|
||||
means any patent claim(s), including without limitation, method, |
|
||||
process, and apparatus claims, in any patent Licensable by such |
|
||||
Contributor that would be infringed, but for the grant of the |
|
||||
License, by the making, using, selling, offering for sale, having |
|
||||
made, import, or transfer of either its Contributions or its |
|
||||
Contributor Version. |
|
||||
|
|
||||
1.12. "Secondary License" |
|
||||
means either the GNU General Public License, Version 2.0, the GNU |
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General |
|
||||
Public License, Version 3.0, or any later versions of those |
|
||||
licenses. |
|
||||
|
|
||||
1.13. "Source Code Form" |
|
||||
means the form of the work preferred for making modifications. |
|
||||
|
|
||||
1.14. "You" (or "Your") |
|
||||
means an individual or a legal entity exercising rights under this |
|
||||
License. For legal entities, "You" includes any entity that |
|
||||
controls, is controlled by, or is under common control with You. For |
|
||||
purposes of this definition, "control" means (a) the power, direct |
|
||||
or indirect, to cause the direction or management of such entity, |
|
||||
whether by contract or otherwise, or (b) ownership of more than |
|
||||
fifty percent (50%) of the outstanding shares or beneficial |
|
||||
ownership of such entity. |
|
||||
|
|
||||
2. License Grants and Conditions |
|
||||
-------------------------------- |
|
||||
|
|
||||
2.1. Grants |
|
||||
|
|
||||
Each Contributor hereby grants You a world-wide, royalty-free, |
|
||||
non-exclusive license: |
|
||||
|
|
||||
(a) under intellectual property rights (other than patent or trademark) |
|
||||
Licensable by such Contributor to use, reproduce, make available, |
|
||||
modify, display, perform, distribute, and otherwise exploit its |
|
||||
Contributions, either on an unmodified basis, with Modifications, or |
|
||||
as part of a Larger Work; and |
|
||||
|
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer |
|
||||
for sale, have made, import, and otherwise transfer either its |
|
||||
Contributions or its Contributor Version. |
|
||||
|
|
||||
2.2. Effective Date |
|
||||
|
|
||||
The licenses granted in Section 2.1 with respect to any Contribution |
|
||||
become effective for each Contribution on the date the Contributor first |
|
||||
distributes such Contribution. |
|
||||
|
|
||||
2.3. Limitations on Grant Scope |
|
||||
|
|
||||
The licenses granted in this Section 2 are the only rights granted under |
|
||||
this License. No additional rights or licenses will be implied from the |
|
||||
distribution or licensing of Covered Software under this License. |
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a |
|
||||
Contributor: |
|
||||
|
|
||||
(a) for any code that a Contributor has removed from Covered Software; |
|
||||
or |
|
||||
|
|
||||
(b) for infringements caused by: (i) Your and any other third party's |
|
||||
modifications of Covered Software, or (ii) the combination of its |
|
||||
Contributions with other software (except as part of its Contributor |
|
||||
Version); or |
|
||||
|
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of |
|
||||
its Contributions. |
|
||||
|
|
||||
This License does not grant any rights in the trademarks, service marks, |
|
||||
or logos of any Contributor (except as may be necessary to comply with |
|
||||
the notice requirements in Section 3.4). |
|
||||
|
|
||||
2.4. Subsequent Licenses |
|
||||
|
|
||||
No Contributor makes additional grants as a result of Your choice to |
|
||||
distribute the Covered Software under a subsequent version of this |
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if |
|
||||
permitted under the terms of Section 3.3). |
|
||||
|
|
||||
2.5. Representation |
|
||||
|
|
||||
Each Contributor represents that the Contributor believes its |
|
||||
Contributions are its original creation(s) or it has sufficient rights |
|
||||
to grant the rights to its Contributions conveyed by this License. |
|
||||
|
|
||||
2.6. Fair Use |
|
||||
|
|
||||
This License is not intended to limit any rights You have under |
|
||||
applicable copyright doctrines of fair use, fair dealing, or other |
|
||||
equivalents. |
|
||||
|
|
||||
2.7. Conditions |
|
||||
|
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted |
|
||||
in Section 2.1. |
|
||||
|
|
||||
3. Responsibilities |
|
||||
------------------- |
|
||||
|
|
||||
3.1. Distribution of Source Form |
|
||||
|
|
||||
All distribution of Covered Software in Source Code Form, including any |
|
||||
Modifications that You create or to which You contribute, must be under |
|
||||
the terms of this License. You must inform recipients that the Source |
|
||||
Code Form of the Covered Software is governed by the terms of this |
|
||||
License, and how they can obtain a copy of this License. You may not |
|
||||
attempt to alter or restrict the recipients' rights in the Source Code |
|
||||
Form. |
|
||||
|
|
||||
3.2. Distribution of Executable Form |
|
||||
|
|
||||
If You distribute Covered Software in Executable Form then: |
|
||||
|
|
||||
(a) such Covered Software must also be made available in Source Code |
|
||||
Form, as described in Section 3.1, and You must inform recipients of |
|
||||
the Executable Form how they can obtain a copy of such Source Code |
|
||||
Form by reasonable means in a timely manner, at a charge no more |
|
||||
than the cost of distribution to the recipient; and |
|
||||
|
|
||||
(b) You may distribute such Executable Form under the terms of this |
|
||||
License, or sublicense it under different terms, provided that the |
|
||||
license for the Executable Form does not attempt to limit or alter |
|
||||
the recipients' rights in the Source Code Form under this License. |
|
||||
|
|
||||
3.3. Distribution of a Larger Work |
|
||||
|
|
||||
You may create and distribute a Larger Work under terms of Your choice, |
|
||||
provided that You also comply with the requirements of this License for |
|
||||
the Covered Software. If the Larger Work is a combination of Covered |
|
||||
Software with a work governed by one or more Secondary Licenses, and the |
|
||||
Covered Software is not Incompatible With Secondary Licenses, this |
|
||||
License permits You to additionally distribute such Covered Software |
|
||||
under the terms of such Secondary License(s), so that the recipient of |
|
||||
the Larger Work may, at their option, further distribute the Covered |
|
||||
Software under the terms of either this License or such Secondary |
|
||||
License(s). |
|
||||
|
|
||||
3.4. Notices |
|
||||
|
|
||||
You may not remove or alter the substance of any license notices |
|
||||
(including copyright notices, patent notices, disclaimers of warranty, |
|
||||
or limitations of liability) contained within the Source Code Form of |
|
||||
the Covered Software, except that You may alter any license notices to |
|
||||
the extent required to remedy known factual inaccuracies. |
|
||||
|
|
||||
3.5. Application of Additional Terms |
|
||||
|
|
||||
You may choose to offer, and to charge a fee for, warranty, support, |
|
||||
indemnity or liability obligations to one or more recipients of Covered |
|
||||
Software. However, You may do so only on Your own behalf, and not on |
|
||||
behalf of any Contributor. You must make it absolutely clear that any |
|
||||
such warranty, support, indemnity, or liability obligation is offered by |
|
||||
You alone, and You hereby agree to indemnify every Contributor for any |
|
||||
liability incurred by such Contributor as a result of warranty, support, |
|
||||
indemnity or liability terms You offer. You may include additional |
|
||||
disclaimers of warranty and limitations of liability specific to any |
|
||||
jurisdiction. |
|
||||
|
|
||||
4. Inability to Comply Due to Statute or Regulation |
|
||||
--------------------------------------------------- |
|
||||
|
|
||||
If it is impossible for You to comply with any of the terms of this |
|
||||
License with respect to some or all of the Covered Software due to |
|
||||
statute, judicial order, or regulation then You must: (a) comply with |
|
||||
the terms of this License to the maximum extent possible; and (b) |
|
||||
describe the limitations and the code they affect. Such description must |
|
||||
be placed in a text file included with all distributions of the Covered |
|
||||
Software under this License. Except to the extent prohibited by statute |
|
||||
or regulation, such description must be sufficiently detailed for a |
|
||||
recipient of ordinary skill to be able to understand it. |
|
||||
|
|
||||
5. Termination |
|
||||
-------------- |
|
||||
|
|
||||
5.1. The rights granted under this License will terminate automatically |
|
||||
if You fail to comply with any of its terms. However, if You become |
|
||||
compliant, then the rights granted under this License from a particular |
|
||||
Contributor are reinstated (a) provisionally, unless and until such |
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an |
|
||||
ongoing basis, if such Contributor fails to notify You of the |
|
||||
non-compliance by some reasonable means prior to 60 days after You have |
|
||||
come back into compliance. Moreover, Your grants from a particular |
|
||||
Contributor are reinstated on an ongoing basis if such Contributor |
|
||||
notifies You of the non-compliance by some reasonable means, this is the |
|
||||
first time You have received notice of non-compliance with this License |
|
||||
from such Contributor, and You become compliant prior to 30 days after |
|
||||
Your receipt of the notice. |
|
||||
|
|
||||
5.2. If You initiate litigation against any entity by asserting a patent |
|
||||
infringement claim (excluding declaratory judgment actions, |
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version |
|
||||
directly or indirectly infringes any patent, then the rights granted to |
|
||||
You by any and all Contributors for the Covered Software under Section |
|
||||
2.1 of this License shall terminate. |
|
||||
|
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all |
|
||||
end user license agreements (excluding distributors and resellers) which |
|
||||
have been validly granted by You or Your distributors under this License |
|
||||
prior to termination shall survive termination. |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 6. Disclaimer of Warranty * |
|
||||
* ------------------------- * |
|
||||
* * |
|
||||
* Covered Software is provided under this License on an "as is" * |
|
||||
* basis, without warranty of any kind, either expressed, implied, or * |
|
||||
* statutory, including, without limitation, warranties that the * |
|
||||
* Covered Software is free of defects, merchantable, fit for a * |
|
||||
* particular purpose or non-infringing. The entire risk as to the * |
|
||||
* quality and performance of the Covered Software is with You. * |
|
||||
* Should any Covered Software prove defective in any respect, You * |
|
||||
* (not any Contributor) assume the cost of any necessary servicing, * |
|
||||
* repair, or correction. This disclaimer of warranty constitutes an * |
|
||||
* essential part of this License. No use of any Covered Software is * |
|
||||
* authorized under this License except under this disclaimer. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 7. Limitation of Liability * |
|
||||
* -------------------------- * |
|
||||
* * |
|
||||
* Under no circumstances and under no legal theory, whether tort * |
|
||||
* (including negligence), contract, or otherwise, shall any * |
|
||||
* Contributor, or anyone who distributes Covered Software as * |
|
||||
* permitted above, be liable to You for any direct, indirect, * |
|
||||
* special, incidental, or consequential damages of any character * |
|
||||
* including, without limitation, damages for lost profits, loss of * |
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any * |
|
||||
* and all other commercial damages or losses, even if such party * |
|
||||
* shall have been informed of the possibility of such damages. This * |
|
||||
* limitation of liability shall not apply to liability for death or * |
|
||||
* personal injury resulting from such party's negligence to the * |
|
||||
* extent applicable law prohibits such limitation. Some * |
|
||||
* jurisdictions do not allow the exclusion or limitation of * |
|
||||
* incidental or consequential damages, so this exclusion and * |
|
||||
* limitation may not apply to You. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
8. Litigation |
|
||||
------------- |
|
||||
|
|
||||
Any litigation relating to this License may be brought only in the |
|
||||
courts of a jurisdiction where the defendant maintains its principal |
|
||||
place of business and such litigation shall be governed by laws of that |
|
||||
jurisdiction, without reference to its conflict-of-law provisions. |
|
||||
Nothing in this Section shall prevent a party's ability to bring |
|
||||
cross-claims or counter-claims. |
|
||||
|
|
||||
9. Miscellaneous |
|
||||
---------------- |
|
||||
|
|
||||
This License represents the complete agreement concerning the subject |
|
||||
matter hereof. If any provision of this License is held to be |
|
||||
unenforceable, such provision shall be reformed only to the extent |
|
||||
necessary to make it enforceable. Any law or regulation which provides |
|
||||
that the language of a contract shall be construed against the drafter |
|
||||
shall not be used to construe this License against a Contributor. |
|
||||
|
|
||||
10. Versions of the License |
|
||||
--------------------------- |
|
||||
|
|
||||
10.1. New Versions |
|
||||
|
|
||||
Mozilla Foundation is the license steward. Except as provided in Section |
|
||||
10.3, no one other than the license steward has the right to modify or |
|
||||
publish new versions of this License. Each version will be given a |
|
||||
distinguishing version number. |
|
||||
|
|
||||
10.2. Effect of New Versions |
|
||||
|
|
||||
You may distribute the Covered Software under the terms of the version |
|
||||
of the License under which You originally received the Covered Software, |
|
||||
or under the terms of any subsequent version published by the license |
|
||||
steward. |
|
||||
|
|
||||
10.3. Modified Versions |
|
||||
|
|
||||
If you create software not governed by this License, and you want to |
|
||||
create a new license for such software, you may create and use a |
|
||||
modified version of this License if you rename the license and remove |
|
||||
any references to the name of the license steward (except to note that |
|
||||
such modified license differs from this License). |
|
||||
|
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary |
|
||||
Licenses |
|
||||
|
|
||||
If You choose to distribute Source Code Form that is Incompatible With |
|
||||
Secondary Licenses under the terms of this version of the License, the |
|
||||
notice described in Exhibit B of this License must be attached. |
|
||||
|
|
||||
Exhibit A - Source Code Form License Notice |
|
||||
------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is subject to the terms of the Mozilla Public |
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this |
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
||||
|
|
||||
If it is not possible or desirable to put the notice in a particular |
|
||||
file, then You may include the notice in a location (such as a LICENSE |
|
||||
file in a relevant directory) where a recipient would be likely to look |
|
||||
for such a notice. |
|
||||
|
|
||||
You may add additional accurate notices of copyright ownership. |
|
||||
|
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice |
|
||||
--------------------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as |
|
||||
defined by the Mozilla Public License, v. 2.0. |
|
File diff suppressed because it is too large
@ -1,373 +0,0 @@ |
|||||
Mozilla Public License Version 2.0 |
|
||||
================================== |
|
||||
|
|
||||
1. Definitions |
|
||||
-------------- |
|
||||
|
|
||||
1.1. "Contributor" |
|
||||
means each individual or legal entity that creates, contributes to |
|
||||
the creation of, or owns Covered Software. |
|
||||
|
|
||||
1.2. "Contributor Version" |
|
||||
means the combination of the Contributions of others (if any) used |
|
||||
by a Contributor and that particular Contributor's Contribution. |
|
||||
|
|
||||
1.3. "Contribution" |
|
||||
means Covered Software of a particular Contributor. |
|
||||
|
|
||||
1.4. "Covered Software" |
|
||||
means Source Code Form to which the initial Contributor has attached |
|
||||
the notice in Exhibit A, the Executable Form of such Source Code |
|
||||
Form, and Modifications of such Source Code Form, in each case |
|
||||
including portions thereof. |
|
||||
|
|
||||
1.5. "Incompatible With Secondary Licenses" |
|
||||
means |
|
||||
|
|
||||
(a) that the initial Contributor has attached the notice described |
|
||||
in Exhibit B to the Covered Software; or |
|
||||
|
|
||||
(b) that the Covered Software was made available under the terms of |
|
||||
version 1.1 or earlier of the License, but not also under the |
|
||||
terms of a Secondary License. |
|
||||
|
|
||||
1.6. "Executable Form" |
|
||||
means any form of the work other than Source Code Form. |
|
||||
|
|
||||
1.7. "Larger Work" |
|
||||
means a work that combines Covered Software with other material, in |
|
||||
a separate file or files, that is not Covered Software. |
|
||||
|
|
||||
1.8. "License" |
|
||||
means this document. |
|
||||
|
|
||||
1.9. "Licensable" |
|
||||
means having the right to grant, to the maximum extent possible, |
|
||||
whether at the time of the initial grant or subsequently, any and |
|
||||
all of the rights conveyed by this License. |
|
||||
|
|
||||
1.10. "Modifications" |
|
||||
means any of the following: |
|
||||
|
|
||||
(a) any file in Source Code Form that results from an addition to, |
|
||||
deletion from, or modification of the contents of Covered |
|
||||
Software; or |
|
||||
|
|
||||
(b) any new file in Source Code Form that contains any Covered |
|
||||
Software. |
|
||||
|
|
||||
1.11. "Patent Claims" of a Contributor |
|
||||
means any patent claim(s), including without limitation, method, |
|
||||
process, and apparatus claims, in any patent Licensable by such |
|
||||
Contributor that would be infringed, but for the grant of the |
|
||||
License, by the making, using, selling, offering for sale, having |
|
||||
made, import, or transfer of either its Contributions or its |
|
||||
Contributor Version. |
|
||||
|
|
||||
1.12. "Secondary License" |
|
||||
means either the GNU General Public License, Version 2.0, the GNU |
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General |
|
||||
Public License, Version 3.0, or any later versions of those |
|
||||
licenses. |
|
||||
|
|
||||
1.13. "Source Code Form" |
|
||||
means the form of the work preferred for making modifications. |
|
||||
|
|
||||
1.14. "You" (or "Your") |
|
||||
means an individual or a legal entity exercising rights under this |
|
||||
License. For legal entities, "You" includes any entity that |
|
||||
controls, is controlled by, or is under common control with You. For |
|
||||
purposes of this definition, "control" means (a) the power, direct |
|
||||
or indirect, to cause the direction or management of such entity, |
|
||||
whether by contract or otherwise, or (b) ownership of more than |
|
||||
fifty percent (50%) of the outstanding shares or beneficial |
|
||||
ownership of such entity. |
|
||||
|
|
||||
2. License Grants and Conditions |
|
||||
-------------------------------- |
|
||||
|
|
||||
2.1. Grants |
|
||||
|
|
||||
Each Contributor hereby grants You a world-wide, royalty-free, |
|
||||
non-exclusive license: |
|
||||
|
|
||||
(a) under intellectual property rights (other than patent or trademark) |
|
||||
Licensable by such Contributor to use, reproduce, make available, |
|
||||
modify, display, perform, distribute, and otherwise exploit its |
|
||||
Contributions, either on an unmodified basis, with Modifications, or |
|
||||
as part of a Larger Work; and |
|
||||
|
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer |
|
||||
for sale, have made, import, and otherwise transfer either its |
|
||||
Contributions or its Contributor Version. |
|
||||
|
|
||||
2.2. Effective Date |
|
||||
|
|
||||
The licenses granted in Section 2.1 with respect to any Contribution |
|
||||
become effective for each Contribution on the date the Contributor first |
|
||||
distributes such Contribution. |
|
||||
|
|
||||
2.3. Limitations on Grant Scope |
|
||||
|
|
||||
The licenses granted in this Section 2 are the only rights granted under |
|
||||
this License. No additional rights or licenses will be implied from the |
|
||||
distribution or licensing of Covered Software under this License. |
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a |
|
||||
Contributor: |
|
||||
|
|
||||
(a) for any code that a Contributor has removed from Covered Software; |
|
||||
or |
|
||||
|
|
||||
(b) for infringements caused by: (i) Your and any other third party's |
|
||||
modifications of Covered Software, or (ii) the combination of its |
|
||||
Contributions with other software (except as part of its Contributor |
|
||||
Version); or |
|
||||
|
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of |
|
||||
its Contributions. |
|
||||
|
|
||||
This License does not grant any rights in the trademarks, service marks, |
|
||||
or logos of any Contributor (except as may be necessary to comply with |
|
||||
the notice requirements in Section 3.4). |
|
||||
|
|
||||
2.4. Subsequent Licenses |
|
||||
|
|
||||
No Contributor makes additional grants as a result of Your choice to |
|
||||
distribute the Covered Software under a subsequent version of this |
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if |
|
||||
permitted under the terms of Section 3.3). |
|
||||
|
|
||||
2.5. Representation |
|
||||
|
|
||||
Each Contributor represents that the Contributor believes its |
|
||||
Contributions are its original creation(s) or it has sufficient rights |
|
||||
to grant the rights to its Contributions conveyed by this License. |
|
||||
|
|
||||
2.6. Fair Use |
|
||||
|
|
||||
This License is not intended to limit any rights You have under |
|
||||
applicable copyright doctrines of fair use, fair dealing, or other |
|
||||
equivalents. |
|
||||
|
|
||||
2.7. Conditions |
|
||||
|
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted |
|
||||
in Section 2.1. |
|
||||
|
|
||||
3. Responsibilities |
|
||||
------------------- |
|
||||
|
|
||||
3.1. Distribution of Source Form |
|
||||
|
|
||||
All distribution of Covered Software in Source Code Form, including any |
|
||||
Modifications that You create or to which You contribute, must be under |
|
||||
the terms of this License. You must inform recipients that the Source |
|
||||
Code Form of the Covered Software is governed by the terms of this |
|
||||
License, and how they can obtain a copy of this License. You may not |
|
||||
attempt to alter or restrict the recipients' rights in the Source Code |
|
||||
Form. |
|
||||
|
|
||||
3.2. Distribution of Executable Form |
|
||||
|
|
||||
If You distribute Covered Software in Executable Form then: |
|
||||
|
|
||||
(a) such Covered Software must also be made available in Source Code |
|
||||
Form, as described in Section 3.1, and You must inform recipients of |
|
||||
the Executable Form how they can obtain a copy of such Source Code |
|
||||
Form by reasonable means in a timely manner, at a charge no more |
|
||||
than the cost of distribution to the recipient; and |
|
||||
|
|
||||
(b) You may distribute such Executable Form under the terms of this |
|
||||
License, or sublicense it under different terms, provided that the |
|
||||
license for the Executable Form does not attempt to limit or alter |
|
||||
the recipients' rights in the Source Code Form under this License. |
|
||||
|
|
||||
3.3. Distribution of a Larger Work |
|
||||
|
|
||||
You may create and distribute a Larger Work under terms of Your choice, |
|
||||
provided that You also comply with the requirements of this License for |
|
||||
the Covered Software. If the Larger Work is a combination of Covered |
|
||||
Software with a work governed by one or more Secondary Licenses, and the |
|
||||
Covered Software is not Incompatible With Secondary Licenses, this |
|
||||
License permits You to additionally distribute such Covered Software |
|
||||
under the terms of such Secondary License(s), so that the recipient of |
|
||||
the Larger Work may, at their option, further distribute the Covered |
|
||||
Software under the terms of either this License or such Secondary |
|
||||
License(s). |
|
||||
|
|
||||
3.4. Notices |
|
||||
|
|
||||
You may not remove or alter the substance of any license notices |
|
||||
(including copyright notices, patent notices, disclaimers of warranty, |
|
||||
or limitations of liability) contained within the Source Code Form of |
|
||||
the Covered Software, except that You may alter any license notices to |
|
||||
the extent required to remedy known factual inaccuracies. |
|
||||
|
|
||||
3.5. Application of Additional Terms |
|
||||
|
|
||||
You may choose to offer, and to charge a fee for, warranty, support, |
|
||||
indemnity or liability obligations to one or more recipients of Covered |
|
||||
Software. However, You may do so only on Your own behalf, and not on |
|
||||
behalf of any Contributor. You must make it absolutely clear that any |
|
||||
such warranty, support, indemnity, or liability obligation is offered by |
|
||||
You alone, and You hereby agree to indemnify every Contributor for any |
|
||||
liability incurred by such Contributor as a result of warranty, support, |
|
||||
indemnity or liability terms You offer. You may include additional |
|
||||
disclaimers of warranty and limitations of liability specific to any |
|
||||
jurisdiction. |
|
||||
|
|
||||
4. Inability to Comply Due to Statute or Regulation |
|
||||
--------------------------------------------------- |
|
||||
|
|
||||
If it is impossible for You to comply with any of the terms of this |
|
||||
License with respect to some or all of the Covered Software due to |
|
||||
statute, judicial order, or regulation then You must: (a) comply with |
|
||||
the terms of this License to the maximum extent possible; and (b) |
|
||||
describe the limitations and the code they affect. Such description must |
|
||||
be placed in a text file included with all distributions of the Covered |
|
||||
Software under this License. Except to the extent prohibited by statute |
|
||||
or regulation, such description must be sufficiently detailed for a |
|
||||
recipient of ordinary skill to be able to understand it. |
|
||||
|
|
||||
5. Termination |
|
||||
-------------- |
|
||||
|
|
||||
5.1. The rights granted under this License will terminate automatically |
|
||||
if You fail to comply with any of its terms. However, if You become |
|
||||
compliant, then the rights granted under this License from a particular |
|
||||
Contributor are reinstated (a) provisionally, unless and until such |
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an |
|
||||
ongoing basis, if such Contributor fails to notify You of the |
|
||||
non-compliance by some reasonable means prior to 60 days after You have |
|
||||
come back into compliance. Moreover, Your grants from a particular |
|
||||
Contributor are reinstated on an ongoing basis if such Contributor |
|
||||
notifies You of the non-compliance by some reasonable means, this is the |
|
||||
first time You have received notice of non-compliance with this License |
|
||||
from such Contributor, and You become compliant prior to 30 days after |
|
||||
Your receipt of the notice. |
|
||||
|
|
||||
5.2. If You initiate litigation against any entity by asserting a patent |
|
||||
infringement claim (excluding declaratory judgment actions, |
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version |
|
||||
directly or indirectly infringes any patent, then the rights granted to |
|
||||
You by any and all Contributors for the Covered Software under Section |
|
||||
2.1 of this License shall terminate. |
|
||||
|
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all |
|
||||
end user license agreements (excluding distributors and resellers) which |
|
||||
have been validly granted by You or Your distributors under this License |
|
||||
prior to termination shall survive termination. |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 6. Disclaimer of Warranty * |
|
||||
* ------------------------- * |
|
||||
* * |
|
||||
* Covered Software is provided under this License on an "as is" * |
|
||||
* basis, without warranty of any kind, either expressed, implied, or * |
|
||||
* statutory, including, without limitation, warranties that the * |
|
||||
* Covered Software is free of defects, merchantable, fit for a * |
|
||||
* particular purpose or non-infringing. The entire risk as to the * |
|
||||
* quality and performance of the Covered Software is with You. * |
|
||||
* Should any Covered Software prove defective in any respect, You * |
|
||||
* (not any Contributor) assume the cost of any necessary servicing, * |
|
||||
* repair, or correction. This disclaimer of warranty constitutes an * |
|
||||
* essential part of this License. No use of any Covered Software is * |
|
||||
* authorized under this License except under this disclaimer. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
************************************************************************ |
|
||||
* * |
|
||||
* 7. Limitation of Liability * |
|
||||
* -------------------------- * |
|
||||
* * |
|
||||
* Under no circumstances and under no legal theory, whether tort * |
|
||||
* (including negligence), contract, or otherwise, shall any * |
|
||||
* Contributor, or anyone who distributes Covered Software as * |
|
||||
* permitted above, be liable to You for any direct, indirect, * |
|
||||
* special, incidental, or consequential damages of any character * |
|
||||
* including, without limitation, damages for lost profits, loss of * |
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any * |
|
||||
* and all other commercial damages or losses, even if such party * |
|
||||
* shall have been informed of the possibility of such damages. This * |
|
||||
* limitation of liability shall not apply to liability for death or * |
|
||||
* personal injury resulting from such party's negligence to the * |
|
||||
* extent applicable law prohibits such limitation. Some * |
|
||||
* jurisdictions do not allow the exclusion or limitation of * |
|
||||
* incidental or consequential damages, so this exclusion and * |
|
||||
* limitation may not apply to You. * |
|
||||
* * |
|
||||
************************************************************************ |
|
||||
|
|
||||
8. Litigation |
|
||||
------------- |
|
||||
|
|
||||
Any litigation relating to this License may be brought only in the |
|
||||
courts of a jurisdiction where the defendant maintains its principal |
|
||||
place of business and such litigation shall be governed by laws of that |
|
||||
jurisdiction, without reference to its conflict-of-law provisions. |
|
||||
Nothing in this Section shall prevent a party's ability to bring |
|
||||
cross-claims or counter-claims. |
|
||||
|
|
||||
9. Miscellaneous |
|
||||
---------------- |
|
||||
|
|
||||
This License represents the complete agreement concerning the subject |
|
||||
matter hereof. If any provision of this License is held to be |
|
||||
unenforceable, such provision shall be reformed only to the extent |
|
||||
necessary to make it enforceable. Any law or regulation which provides |
|
||||
that the language of a contract shall be construed against the drafter |
|
||||
shall not be used to construe this License against a Contributor. |
|
||||
|
|
||||
10. Versions of the License |
|
||||
--------------------------- |
|
||||
|
|
||||
10.1. New Versions |
|
||||
|
|
||||
Mozilla Foundation is the license steward. Except as provided in Section |
|
||||
10.3, no one other than the license steward has the right to modify or |
|
||||
publish new versions of this License. Each version will be given a |
|
||||
distinguishing version number. |
|
||||
|
|
||||
10.2. Effect of New Versions |
|
||||
|
|
||||
You may distribute the Covered Software under the terms of the version |
|
||||
of the License under which You originally received the Covered Software, |
|
||||
or under the terms of any subsequent version published by the license |
|
||||
steward. |
|
||||
|
|
||||
10.3. Modified Versions |
|
||||
|
|
||||
If you create software not governed by this License, and you want to |
|
||||
create a new license for such software, you may create and use a |
|
||||
modified version of this License if you rename the license and remove |
|
||||
any references to the name of the license steward (except to note that |
|
||||
such modified license differs from this License). |
|
||||
|
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary |
|
||||
Licenses |
|
||||
|
|
||||
If You choose to distribute Source Code Form that is Incompatible With |
|
||||
Secondary Licenses under the terms of this version of the License, the |
|
||||
notice described in Exhibit B of this License must be attached. |
|
||||
|
|
||||
Exhibit A - Source Code Form License Notice |
|
||||
------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is subject to the terms of the Mozilla Public |
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this |
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
||||
|
|
||||
If it is not possible or desirable to put the notice in a particular |
|
||||
file, then You may include the notice in a location (such as a LICENSE |
|
||||
file in a relevant directory) where a recipient would be likely to look |
|
||||
for such a notice. |
|
||||
|
|
||||
You may add additional accurate notices of copyright ownership. |
|
||||
|
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice |
|
||||
--------------------------------------------------------- |
|
||||
|
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as |
|
||||
defined by the Mozilla Public License, v. 2.0. |
|
@ -1,55 +1,46 @@ |
|||||
#!/usr/bin/env node |
#!/usr/bin/env node |
||||
'use strict'; |
|
||||
|
|
||||
|
const Neutrino = require('../src/neutrino'); |
||||
|
const yargs = require('yargs'); |
||||
const path = require('path'); |
const path = require('path'); |
||||
const Vorpal = require('vorpal'); |
const pkg = require(path.join(process.cwd(), 'package.json')); |
||||
const commands = require('../package.json').commands; |
|
||||
|
const pkgPresets = pkg.config && pkg.config.presets ? pkg.config.presets : []; |
||||
const cli = new Vorpal(); |
const environments = { build: 'production', start: 'development', test: 'test' }; |
||||
const register = (command) => { |
const args = yargs |
||||
const cmd = command.command; |
.option('presets', { |
||||
const name = cmd.split(' ')[0]; |
description: 'A list of Neutrino presets used to configure the build', |
||||
const options = command.options || []; |
array: true, |
||||
const dir = path.resolve(__dirname, `../commands/${name}`); |
default: [], |
||||
const cliCommand = cli.command(cmd, command.description); |
global: true |
||||
|
}) |
||||
Object |
.command('start', 'Build a project in development mode') |
||||
.keys(options) |
.command('build', 'Compile the source directory to a bundled build') |
||||
.map(option => { |
.command('test [files..]', 'Run all suites from the test directory or provided files', { |
||||
if (Array.isArray(options[option])) { |
watch: { |
||||
cliCommand.option.apply(cliCommand, [option].concat(options[option])); |
boolean: true |
||||
} else { |
} |
||||
cliCommand.option(option, options[option]); |
}) |
||||
|
.demandCommand(1, 'You must specify a command for Neutrino to run.\nUSAGE: neutrino <command>') |
||||
|
.recommendCommands() |
||||
|
.strict() |
||||
|
.version() |
||||
|
.help() |
||||
|
.argv; |
||||
|
|
||||
|
function run(command, presets) { |
||||
|
process.env.NODE_ENV = environments[command]; |
||||
|
const N = new Neutrino(presets); |
||||
|
|
||||
|
N[command](args) |
||||
|
.then(() => process.exit(0)) |
||||
|
.catch(err => { |
||||
|
if (err) { |
||||
|
console.error(err); |
||||
} |
} |
||||
}); |
|
||||
|
|
||||
cliCommand |
|
||||
.action(function(args) { |
|
||||
const done = (code) => process.exit(code || 0); |
|
||||
|
|
||||
if (this.commandObject._events) { |
|
||||
const options = Object |
|
||||
.keys(this.commandObject._events) |
|
||||
.reduce((options, key) => { |
|
||||
options[key] = this.commandObject[key]; |
|
||||
|
|
||||
return options; |
|
||||
}, {}); |
|
||||
|
|
||||
args.options = Object.assign(options, args.options); |
process.exit(1); |
||||
} |
|
||||
|
|
||||
process.env.NODE_ENV = command.environment || 'development'; |
|
||||
|
|
||||
// Kick off the command |
|
||||
require(dir)(args, done); |
|
||||
}); |
}); |
||||
}; |
} |
||||
|
|
||||
commands.map(register); |
|
||||
|
|
||||
cli |
|
||||
.find('exit') |
|
||||
.hidden(); |
|
||||
|
|
||||
cli.parse.apply(cli, process.argv[2] ? [process.argv] : process.argv.concat(['help'])); |
run(args._[0], [...new Set(args.presets.concat(pkgPresets))]); |
||||
|
@ -1,100 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
const getPreset = require('../../src/get-preset'); |
|
||||
const DevServer = require('webpack-dev-server'); |
|
||||
const webpack = require('webpack'); |
|
||||
|
|
||||
const handleErrors = (err, stats) => { |
|
||||
if (err) { |
|
||||
console.error(err.stack || err); |
|
||||
|
|
||||
if (err.details) { |
|
||||
console.error(err.details); |
|
||||
} |
|
||||
|
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
const jsonStats = stats.toJson(); |
|
||||
|
|
||||
if (jsonStats.errors.length) { |
|
||||
jsonStats.errors.map(err => console.error(err)); |
|
||||
return true; |
|
||||
} |
|
||||
|
|
||||
return false; |
|
||||
}; |
|
||||
|
|
||||
const build = (config, done) => { |
|
||||
const compiler = webpack(config); |
|
||||
|
|
||||
compiler.run((err, stats) => { |
|
||||
const failed = handleErrors(err, stats); |
|
||||
|
|
||||
if (failed) { |
|
||||
return done(1); |
|
||||
} |
|
||||
|
|
||||
console.log(stats.toString({ |
|
||||
colors: true, |
|
||||
chunks: false, |
|
||||
children: false |
|
||||
})); |
|
||||
|
|
||||
done(0); |
|
||||
}); |
|
||||
}; |
|
||||
|
|
||||
const watch = (config, handler, done) => { |
|
||||
const compiler = webpack(config); |
|
||||
const watcher = compiler.watch(config.watchOptions || {}, (err, stats) => { |
|
||||
if (!err) { |
|
||||
return handler(); |
|
||||
} |
|
||||
|
|
||||
console.error(err.stack || err); |
|
||||
|
|
||||
if (err.details) { |
|
||||
console.error(err.details); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
process.on('SIGINT', () => watcher.close(done)); |
|
||||
}; |
|
||||
|
|
||||
const devServer = (config, done) => { |
|
||||
const protocol = config.devServer.https ? 'https' : 'http'; |
|
||||
const host = config.devServer.host || 'localhost'; |
|
||||
const port = config.devServer.port || 5000; |
|
||||
const compiler = webpack(config); |
|
||||
const server = new DevServer(compiler, config.devServer); |
|
||||
|
|
||||
process.on('SIGINT', done); |
|
||||
server.listen(port, host, () => { |
|
||||
console.log(`Dev server started at ${protocol}://${host}:${port}`); |
|
||||
console.log('Waiting for initial build to finish...'); |
|
||||
}); |
|
||||
}; |
|
||||
|
|
||||
module.exports = (args, done) => { |
|
||||
const config = getPreset(args.options.preset); |
|
||||
|
|
||||
if (process.env.NODE_ENV === 'production') { |
|
||||
return build(config, done); |
|
||||
} |
|
||||
|
|
||||
// If we can't start a development server, just do a build,
|
|
||||
// which is currently the case for Node.js packages since we
|
|
||||
// don't have HMR implemented
|
|
||||
// TODO: look into https://github.com/housinghq/warm-require
|
|
||||
if (!config.devServer || config.target === 'node') { |
|
||||
console.log('Warning: This preset does not support watch compilation. Falling back to a one-time build.'); |
|
||||
return build(config, done); |
|
||||
} |
|
||||
|
|
||||
devServer(config, done); |
|
||||
}; |
|
||||
|
|
||||
module.exports.build = build; |
|
||||
module.exports.devServer = devServer; |
|
||||
module.exports.watch = watch; |
|
@ -1,11 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
const webpack = require('webpack'); |
|
||||
const build = require('../build'); |
|
||||
|
|
||||
module.exports = (args, done) => { |
|
||||
// Right now the main point of having this `start` entry point is to ensure that
|
|
||||
// NODE_ENV is development.
|
|
||||
// TODO: consolidate build command to accept a --watch flag which correctly handles NODE_ENV
|
|
||||
return build(args, done); |
|
||||
}; |
|
@ -1,39 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
const getPreset = require('../../src/get-preset'); |
|
||||
const Server = require('karma').Server; |
|
||||
const builder = require('../build'); |
|
||||
const mochaBin = require('../../src/mocha'); |
|
||||
|
|
||||
const karma = (config, args, done) => { |
|
||||
const karma = config.karma; |
|
||||
|
|
||||
delete config.karma; |
|
||||
delete config.plugins; |
|
||||
karma.webpack = config; |
|
||||
karma.singleRun = !args.options.watch; |
|
||||
karma.autoWatch = args.options.watch; |
|
||||
|
|
||||
if (args.files) { |
|
||||
karma.files = args.files; |
|
||||
} |
|
||||
|
|
||||
new Server(karma, done).start(); |
|
||||
}; |
|
||||
|
|
||||
const mocha = (config, args, done) => { |
|
||||
args.options.watch ? |
|
||||
builder.watch(config, () => mochaBin(config, args), done) : |
|
||||
builder.build(config, () => mochaBin(config, args, done)); |
|
||||
}; |
|
||||
|
|
||||
module.exports = (args, done) => { |
|
||||
const config = getPreset(args.options.preset); |
|
||||
|
|
||||
|
|
||||
if (config.plugins.find(p => p.options && p.options.options && p.options.options.mocha)) { |
|
||||
mocha(config, args, done); |
|
||||
} else { |
|
||||
karma(config, args, done); |
|
||||
} |
|
||||
}; |
|
@ -1,44 +0,0 @@ |
|||||
'use strict'; |
|
||||
|
|
||||
const path = require('path'); |
|
||||
const merge = require('webpack-merge').smart; |
|
||||
|
|
||||
const cwd = process.cwd(); |
|
||||
const pkg = require(path.join(cwd, 'package.json')); |
|
||||
|
|
||||
module.exports = (preset) => { |
|
||||
if (!preset) { |
|
||||
if (!pkg.config || !pkg.config.preset) { |
|
||||
throw new Error(`This command requires a preset.
|
|
||||
Specify one using -p, --preset, or in your package.json as \`config.preset\`.`); |
|
||||
} |
|
||||
|
|
||||
preset = pkg.config.preset; |
|
||||
} |
|
||||
|
|
||||
const modules = [ |
|
||||
preset, |
|
||||
path.join(process.cwd(), preset), |
|
||||
path.join(process.cwd(), 'node_modules', preset) |
|
||||
]; |
|
||||
|
|
||||
// Try requiring the preset as an absolute dependency, and if that fails
|
|
||||
// try requiring it as relative to the project
|
|
||||
for (let i = 0; i < modules.length; i++) { |
|
||||
try { |
|
||||
const module = require(modules[i]); |
|
||||
const core = 'toConfig' in module ? module.toConfig() : module; |
|
||||
const config = pkg.config && pkg.config.neutrino ? |
|
||||
merge(core, pkg.config.neutrino) : |
|
||||
core; |
|
||||
|
|
||||
return config; |
|
||||
} catch (err) { |
|
||||
if (!/Cannot find module/.test(err.message)) { |
|
||||
throw err; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
throw new Error(`Unable to locate preset \`${preset}\``); |
|
||||
}; |
|
@ -1,40 +0,0 @@ |
|||||
const spawn = require('child_process').spawn; |
|
||||
const toParam = require('change-case').paramCase; |
|
||||
|
|
||||
let proc; |
|
||||
|
|
||||
module.exports = (config, args, done) => { |
|
||||
if (proc) { |
|
||||
proc.kill(); |
|
||||
} |
|
||||
|
|
||||
const babelLoader = config.module.rules.find(r => r.use && r.use.loader && r.use.loader.includes('babel')); |
|
||||
const mochaLoader = config.plugins.find(p => p.options && p.options.options && p.options.options.mocha); |
|
||||
const mocha = mochaLoader ? mochaLoader.options.options.mocha : null; |
|
||||
|
|
||||
if (args.files) { |
|
||||
mocha.recursive = true; |
|
||||
} |
|
||||
|
|
||||
process.env.NEUTRINO_BABEL_CONFIG = JSON.stringify(babelLoader ? babelLoader.use.options : {}); |
|
||||
|
|
||||
const argv = Object |
|
||||
.keys(mocha) |
|
||||
.reduce((argv, key) => { |
|
||||
const value = mocha[key]; |
|
||||
|
|
||||
return value === true ? |
|
||||
argv.concat(`--${toParam(key)}`) : |
|
||||
argv.concat(`--${toParam(key)}`, mocha[key]); |
|
||||
}, ['--require', require.resolve('./register')]); |
|
||||
|
|
||||
proc = spawn(require.resolve('mocha/bin/mocha'), args.files ? argv.concat(args.files) : argv, { |
|
||||
cwd: process.cwd(), |
|
||||
env: process.env, |
|
||||
stdio: 'inherit' |
|
||||
}); |
|
||||
|
|
||||
if (done) { |
|
||||
proc.on('close', done); |
|
||||
} |
|
||||
}; |
|
@ -0,0 +1,163 @@ |
|||||
|
const path = require('path'); |
||||
|
const EventEmitter = require('events').EventEmitter; |
||||
|
const merge = require('webpack-merge').smart; |
||||
|
const DevServer = require('webpack-dev-server'); |
||||
|
const webpack = require('webpack'); |
||||
|
|
||||
|
const cwd = process.cwd(); |
||||
|
const noop = Function.prototype; |
||||
|
|
||||
|
module.exports = class Neutrino extends EventEmitter { |
||||
|
constructor(presets) { |
||||
|
super(); |
||||
|
this.configs = []; |
||||
|
this.__configCache = null; |
||||
|
this.custom = {}; |
||||
|
|
||||
|
presets.map(p => this.loadPreset(p)); |
||||
|
} |
||||
|
|
||||
|
loadPreset(name) { |
||||
|
const paths = [ |
||||
|
path.join(cwd, name), |
||||
|
path.join(cwd, 'node_modules', name), |
||||
|
name |
||||
|
]; |
||||
|
|
||||
|
for (let i = 0; i < paths.length; i++) { |
||||
|
try { |
||||
|
const preset = require(paths[i])(this); |
||||
|
|
||||
|
if (preset) { |
||||
|
this.configs.push(preset); |
||||
|
} |
||||
|
|
||||
|
return; |
||||
|
} catch (err) { |
||||
|
if (!/Cannot find module/.test(err.message)) { |
||||
|
throw err; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
throw new Error(`Unable to locate preset "${name}"`); |
||||
|
} |
||||
|
|
||||
|
handleErrors(err, stats) { |
||||
|
if (err) { |
||||
|
console.error(err.stack || err); |
||||
|
|
||||
|
if (err.details) { |
||||
|
console.error(err.details); |
||||
|
} |
||||
|
|
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
const jsonStats = stats.toJson(); |
||||
|
|
||||
|
if (jsonStats.errors.length) { |
||||
|
jsonStats.errors.map(err => console.error(err)); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
getConfig() { |
||||
|
if (this.__configCache) { |
||||
|
return this.__configCache; |
||||
|
} |
||||
|
|
||||
|
return this.__configCache = merge(...this.configs.map(c => 'toConfig' in c ? c.toConfig() : c)); |
||||
|
} |
||||
|
|
||||
|
emitForAll(eventName, payload) { |
||||
|
const config = this.getConfig(); |
||||
|
|
||||
|
return Promise.all(this.listeners(eventName).map(fn => fn(config, payload))); |
||||
|
} |
||||
|
|
||||
|
build(args) { |
||||
|
return this |
||||
|
.emitForAll('prebuild') |
||||
|
.then(() => new Promise((resolve, reject) => { |
||||
|
const config = this.getConfig(); |
||||
|
const compiler = webpack(config); |
||||
|
|
||||
|
compiler.run((err, stats) => { |
||||
|
const failed = this.handleErrors(err, stats); |
||||
|
|
||||
|
if (failed) { |
||||
|
return reject(); |
||||
|
} |
||||
|
|
||||
|
console.log(stats.toString({ |
||||
|
colors: true, |
||||
|
chunks: false, |
||||
|
children: false |
||||
|
})); |
||||
|
|
||||
|
resolve(); |
||||
|
}); |
||||
|
})) |
||||
|
.then(() => this.emitForAll('build')); |
||||
|
} |
||||
|
|
||||
|
start(args) { |
||||
|
return this |
||||
|
.emitForAll('prestart') |
||||
|
.then(() => { |
||||
|
const config = this.getConfig(); |
||||
|
|
||||
|
if (config.devServer) { |
||||
|
return this._devServer(); |
||||
|
} |
||||
|
|
||||
|
if (config.target === 'node') { |
||||
|
console.log('Warning: This preset does not support watch compilation. Falling back to a one-time build.'); |
||||
|
return this.build(); |
||||
|
} |
||||
|
|
||||
|
return new Promise(resolve => { |
||||
|
const config = this.getConfig(); |
||||
|
const compiler = webpack(config); |
||||
|
const watcher = compiler.watch(config.watchOptions || {}, (err, stats) => { |
||||
|
this.handleErrors(err, stats); |
||||
|
}); |
||||
|
|
||||
|
process.on('SIGINT', () => watcher.close(resolve)); |
||||
|
}); |
||||
|
}) |
||||
|
.then(() => this.emitForAll('start')); |
||||
|
} |
||||
|
|
||||
|
_devServer() { |
||||
|
return new Promise(resolve => { |
||||
|
const config = this.getConfig(); |
||||
|
const protocol = config.devServer.https ? 'https' : 'http'; |
||||
|
const host = config.devServer.host || 'localhost'; |
||||
|
const port = config.devServer.port || 5000; |
||||
|
|
||||
|
const compiler = webpack(config); |
||||
|
const server = new DevServer(compiler, config.devServer); |
||||
|
|
||||
|
process.on('SIGINT', resolve); |
||||
|
|
||||
|
server.listen(port, host, () => { |
||||
|
console.log(`Dev server started at ${protocol}://${host}:${port}`); |
||||
|
console.log('Waiting for initial build to finish...'); |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
test(args) { |
||||
|
return this |
||||
|
.emitForAll('pretest', args) |
||||
|
.then(() => this.emitForAll('test', args)); |
||||
|
} |
||||
|
|
||||
|
extend(source, extender) { |
||||
|
return extender(source(this)); |
||||
|
} |
||||
|
}; |
@ -1,5 +0,0 @@ |
|||||
const crypto = require('crypto'); |
|
||||
const os = require('os'); |
|
||||
const path = require('path'); |
|
||||
|
|
||||
module.exports = () => path.join(os.tmpdir(), crypto.randomBytes(8).toString('hex')); |
|
File diff suppressed because it is too large
@ -1,13 +0,0 @@ |
|||||
{ |
|
||||
"neutrino": [], |
|
||||
"neutrino-preset-base": [], |
|
||||
"neutrino-preset-node": [ |
|
||||
"neutrino-preset-base" |
|
||||
], |
|
||||
"neutrino-preset-react": [ |
|
||||
"neutrino-preset-web" |
|
||||
], |
|
||||
"neutrino-preset-web": [ |
|
||||
"neutrino-preset-base" |
|
||||
] |
|
||||
} |
|
Loading…
Reference in new issue