Build update
This commit is contained in:
parent
0e7c115b73
commit
317a59d550
@ -27,16 +27,16 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "npm run build:lib && npm run build:app",
|
||||
"build:app": "webpack --config webpack/app",
|
||||
"build:lib": "webpack --config webpack/libraries",
|
||||
"build:app": "parallel-webpack -p=2 --config webpack/app",
|
||||
"build:lib": "parallel-webpack -p=2 --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 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:app": "NODE_ENV=production parallel-webpack -p=2 --config webpack/app",
|
||||
"ci:build:lib": "NODE_ENV=production parallel-webpack -p=2 --config webpack/libraries",
|
||||
"ci:build:npm": "NODE_ENV=production parallel-webpack -p=2 --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 ./.happypack ./build ./node_modules/.cache",
|
||||
|
@ -49,12 +49,17 @@ const entry = isEmbed
|
||||
index: './index.js'
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
module.exports = Object.keys(entry).map((entryName) => {
|
||||
const entrySrc = entry[entryName];
|
||||
|
||||
return {
|
||||
cache: !isProd,
|
||||
devtool: isProd ? '#hidden-source-map' : '#source-map',
|
||||
|
||||
context: path.join(__dirname, '../src'),
|
||||
entry,
|
||||
entry: {
|
||||
[entryName]: entrySrc
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, '../', DEST),
|
||||
filename: '[name].js'
|
||||
@ -264,3 +269,4 @@ module.exports = {
|
||||
return plugins;
|
||||
}())
|
||||
};
|
||||
});
|
||||
|
@ -24,12 +24,11 @@ const Shared = require('./shared');
|
||||
|
||||
const DEST = process.env.BUILD_DEST || '.build';
|
||||
|
||||
module.exports = {
|
||||
module.exports = ['inject', 'parity', 'web3'].map((entryName) => {
|
||||
return {
|
||||
context: path.join(__dirname, '../src'),
|
||||
entry: {
|
||||
inject: ['./inject.js'],
|
||||
parity: ['./inject.js'],
|
||||
web3: ['./inject.js']
|
||||
[entryName]: ['./inject.js']
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, '../', DEST),
|
||||
@ -82,3 +81,4 @@ module.exports = {
|
||||
},
|
||||
plugins: Shared.getPlugins()
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user