Update build
This commit is contained in:
parent
0b71baac4a
commit
0e7c115b73
32
js/package-lock.json
generated
32
js/package-lock.json
generated
@ -3673,9 +3673,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"copy-to-clipboard": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.0.7.tgz",
|
||||
"integrity": "sha1-DPtpxvVPRg3MnWxVg179y8ksSjo=",
|
||||
"version": "3.0.8",
|
||||
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.0.8.tgz",
|
||||
"integrity": "sha512-c3GdeY8qxCHGezVb1EFQfHYK/8NZRemgcTIzPq7PuxjHAf/raKibn2QdhHPb/y6q74PMgH6yizaDZlRmw6QyKw==",
|
||||
"requires": {
|
||||
"toggle-selection": "1.0.6"
|
||||
}
|
||||
@ -7561,15 +7561,16 @@
|
||||
}
|
||||
},
|
||||
"happypack": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/happypack/-/happypack-3.0.3.tgz",
|
||||
"integrity": "sha1-IveMh6MlzbeYyVjPTsOD/NTW/cc=",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/happypack/-/happypack-3.1.0.tgz",
|
||||
"integrity": "sha1-i8VeNwG6z/cY04icuItQIWQcrVk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "1.5.0",
|
||||
"json-stringify-safe": "5.0.1",
|
||||
"loader-utils": "0.2.16",
|
||||
"mkdirp": "0.5.1"
|
||||
"mkdirp": "0.5.1",
|
||||
"serialize-error": "2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": {
|
||||
@ -10615,7 +10616,7 @@
|
||||
"stream-browserify": "2.0.1",
|
||||
"stream-http": "2.7.2",
|
||||
"string_decoder": "0.10.31",
|
||||
"timers-browserify": "2.0.2",
|
||||
"timers-browserify": "2.0.3",
|
||||
"tty-browserify": "0.0.0",
|
||||
"url": "0.11.0",
|
||||
"util": "0.10.3",
|
||||
@ -12556,7 +12557,7 @@
|
||||
"resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-4.2.3.tgz",
|
||||
"integrity": "sha1-JoxaD73pqV2WFFAU5/hRELDn+44=",
|
||||
"requires": {
|
||||
"copy-to-clipboard": "3.0.7"
|
||||
"copy-to-clipboard": "3.0.8"
|
||||
}
|
||||
},
|
||||
"react-datetime": {
|
||||
@ -13600,6 +13601,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialize-error": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
|
||||
"integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=",
|
||||
"dev": true
|
||||
},
|
||||
"serve-static": {
|
||||
"version": "1.11.2",
|
||||
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.11.2.tgz",
|
||||
@ -14687,11 +14694,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"timers-browserify": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz",
|
||||
"integrity": "sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y=",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.3.tgz",
|
||||
"integrity": "sha512-+JAqyNgg+M8+gXIrq2EeUr4kZqRz47Ysco7X5QKRGScRE9HIHckyHD1asozSFGeqx2nmPCgA8T5tIGVO0ML7/w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"global": "4.3.2",
|
||||
"setimmediate": "1.0.5"
|
||||
}
|
||||
},
|
||||
|
@ -27,19 +27,19 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "npm run build:lib && npm run build:app",
|
||||
"build:app": "parallel-webpack -p=4 --config webpack/app",
|
||||
"build:lib": "parallel-webpack -p=4 --config webpack/libraries",
|
||||
"build:app": "webpack --config webpack/app",
|
||||
"build:lib": "webpack --config webpack/libraries",
|
||||
"build:markdown": "babel-node ./scripts/build-rpc-markdown.js",
|
||||
"build:json": "babel-node ./scripts/build-rpc-json.js",
|
||||
"build:embed": "EMBED=1 node webpack/embed",
|
||||
"build:i18n": "npm run clean && npm run build && babel-node ./scripts/build-i18n.js",
|
||||
"ci:build": "npm run ci:build:lib && npm run ci:build:app && npm run ci:build:embed",
|
||||
"ci:build:app": "NODE_ENV=production parallel-webpack -p=4 --config webpack/app",
|
||||
"ci:build:lib": "NODE_ENV=production parallel-webpack -p=4 --config webpack/libraries",
|
||||
"ci:build:npm": "NODE_ENV=production parallel-webpack -p=4 --config webpack/npm",
|
||||
"ci:build:app": "NODE_ENV=production webpack --config webpack/app",
|
||||
"ci:build:lib": "NODE_ENV=production webpack --config webpack/libraries",
|
||||
"ci:build:npm": "NODE_ENV=production webpack --config webpack/npm",
|
||||
"ci:build:jsonrpc": "babel-node ./scripts/build-rpc-json.js --output .npmjs/jsonrpc",
|
||||
"ci:build:embed": "NODE_ENV=production EMBED=1 node webpack/embed",
|
||||
"clean": "rm -rf ./.build ./.coverage ./build ./node_modules/.cache",
|
||||
"clean": "rm -rf ./.build ./.coverage ./.happypack ./build ./node_modules/.cache",
|
||||
"coveralls": "npm run testCoverage && coveralls < coverage/lcov.info",
|
||||
"lint": "npm run lint:css && npm run lint:js",
|
||||
"lint:cached": "npm run lint:css && npm run lint:js:cached",
|
||||
@ -106,7 +106,7 @@
|
||||
"extract-text-webpack-plugin": "3.0.0",
|
||||
"file-loader": "0.10.0",
|
||||
"flow-bin": "^0.46.0",
|
||||
"happypack": "3.0.3",
|
||||
"happypack": "3.1.0",
|
||||
"html-loader": "0.4.4",
|
||||
"html-webpack-plugin": "2.28.0",
|
||||
"http-proxy-middleware": "0.17.3",
|
||||
|
@ -49,17 +49,12 @@ const entry = isEmbed
|
||||
index: './index.js'
|
||||
});
|
||||
|
||||
module.exports = Object.keys(entry).map((entryName) => {
|
||||
const entrySrc = entry[entryName];
|
||||
|
||||
return {
|
||||
module.exports = {
|
||||
cache: !isProd,
|
||||
devtool: isProd ? '#hidden-source-map' : '#source-map',
|
||||
|
||||
context: path.join(__dirname, '../src'),
|
||||
entry: {
|
||||
[entryName]: entrySrc
|
||||
},
|
||||
entry,
|
||||
output: {
|
||||
path: path.join(__dirname, '../', DEST),
|
||||
filename: '[name].js'
|
||||
@ -268,5 +263,4 @@ module.exports = Object.keys(entry).map((entryName) => {
|
||||
|
||||
return plugins;
|
||||
}())
|
||||
};
|
||||
});
|
||||
};
|
||||
|
@ -24,11 +24,12 @@ const Shared = require('./shared');
|
||||
|
||||
const DEST = process.env.BUILD_DEST || '.build';
|
||||
|
||||
module.exports = ['inject', 'parity', 'web3'].map((entryName) => {
|
||||
return {
|
||||
module.exports = {
|
||||
context: path.join(__dirname, '../src'),
|
||||
entry: {
|
||||
[entryName]: ['./inject.js']
|
||||
inject: ['./inject.js'],
|
||||
parity: ['./inject.js'],
|
||||
web3: ['./inject.js']
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, '../', DEST),
|
||||
@ -80,5 +81,4 @@ module.exports = ['inject', 'parity', 'web3'].map((entryName) => {
|
||||
]
|
||||
},
|
||||
plugins: Shared.getPlugins()
|
||||
};
|
||||
});
|
||||
};
|
||||
|
@ -17,5 +17,5 @@
|
||||
module.exports = {
|
||||
test: /\.js$/,
|
||||
include: /node_modules\/(get-own-enumerable-property-symbols|ethereumjs-tx|stringify-object)/,
|
||||
use: 'babel-loader'
|
||||
use: [ 'babel-loader' ]
|
||||
};
|
||||
|
@ -17,5 +17,5 @@
|
||||
module.exports = {
|
||||
test: /\.js$/,
|
||||
include: /node_modules\/@parity\//,
|
||||
use: 'babel-loader'
|
||||
use: [ 'babel-loader' ]
|
||||
};
|
||||
|
@ -18,6 +18,7 @@ const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// const HappyPack = require('happypack');
|
||||
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
const PackageJson = require('../package.json');
|
||||
|
||||
@ -83,6 +84,11 @@ function getPlugins (_isProd = isProd) {
|
||||
UI_VERSION: JSON.stringify(UI_VERSION)
|
||||
}
|
||||
})
|
||||
// new HappyPack({
|
||||
// id: 'babel',
|
||||
// threads: 4,
|
||||
// loaders: [ 'babel-loader' ]
|
||||
// })
|
||||
];
|
||||
|
||||
if (_isProd) {
|
||||
|
Loading…
Reference in New Issue
Block a user