add webpack parallel build/watch

This commit is contained in:
Jiiks 2019-03-05 10:07:49 +02:00
parent c7bea4a743
commit b440206d07
5 changed files with 131 additions and 3 deletions

View File

@ -2,7 +2,7 @@
"name": "bdclient",
"description": "BetterDiscord client package",
"author": "Jiiks",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"homepage": "https://betterdiscord.net",
"license": "MIT",
"main": "dist/betterdiscord.client.js",

View File

@ -2,7 +2,7 @@
"name": "bdcore",
"description": "BetterDiscord core package",
"author": "Jiiks",
"version": "2.0.0-beta.3",
"version": "2.0.0-beta.4",
"homepage": "https://betterdiscord.net",
"license": "MIT",
"main": "dist/main.js",

99
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "betterdiscord",
"version": "2.0.0-beta",
"version": "2.0.0-beta.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -3022,6 +3022,12 @@
"object.defaults": "^1.1.0"
}
},
"easy-stack": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/easy-stack/-/easy-stack-1.0.0.tgz",
"integrity": "sha1-EskbMIWjfwuqM26UhurEv5Tj54g=",
"dev": true
},
"ecc-jsbn": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
@ -3706,6 +3712,12 @@
"es5-ext": "~0.10.14"
}
},
"event-pubsub": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/event-pubsub/-/event-pubsub-4.3.0.tgz",
"integrity": "sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==",
"dev": true
},
"event-stream": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",
@ -6438,6 +6450,21 @@
"integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==",
"dev": true
},
"js-message": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.5.tgz",
"integrity": "sha1-IwDSSxrwjondCVvBpMnJz8uJLRU=",
"dev": true
},
"js-queue": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/js-queue/-/js-queue-2.0.0.tgz",
"integrity": "sha1-NiITz4YPRo8BJfxslqvBdCUx+Ug=",
"dev": true,
"requires": {
"easy-stack": "^1.0.0"
}
},
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@ -6757,6 +6784,12 @@
"integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=",
"dev": true
},
"lodash.endswith": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/lodash.endswith/-/lodash.endswith-4.2.1.tgz",
"integrity": "sha1-/tWawXOO0+I27dcGTsRWRIs3vAk=",
"dev": true
},
"lodash.flatten": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
@ -7355,6 +7388,17 @@
}
}
},
"node-ipc": {
"version": "9.1.1",
"resolved": "https://registry.npmjs.org/node-ipc/-/node-ipc-9.1.1.tgz",
"integrity": "sha512-FAyICv0sIRJxVp3GW5fzgaf9jwwRQxAKDJlmNFUL5hOy+W4X/I5AypyHoq0DXXbo9o/gt79gj++4cMr4jVWE/w==",
"dev": true,
"requires": {
"event-pubsub": "4.3.0",
"js-message": "1.0.5",
"js-queue": "2.0.0"
}
},
"node-libs-browser": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz",
@ -7908,6 +7952,59 @@
"readable-stream": "^2.1.5"
}
},
"parallel-webpack": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/parallel-webpack/-/parallel-webpack-2.3.0.tgz",
"integrity": "sha512-RCIDF+YOqyAJeM8NumtOQ8JYjUXexDRIN4slFNfvUp1RxLB1zLeLZMAwlP6s7l9LhuR5xJ2pv8ckIsdESzSqog==",
"dev": true,
"requires": {
"ajv": "^4.9.2",
"bluebird": "^3.0.6",
"chalk": "^1.1.1",
"interpret": "^1.0.1",
"lodash.assign": "^4.0.8",
"lodash.endswith": "^4.0.1",
"lodash.flatten": "^4.2.0",
"minimist": "^1.2.0",
"node-ipc": "^9.1.0",
"pluralize": "^1.2.1",
"supports-color": "^3.1.2",
"worker-farm": "^1.3.1"
},
"dependencies": {
"ajv": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
"dev": true,
"requires": {
"co": "^4.6.0",
"json-stable-stringify": "^1.0.1"
}
},
"has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
"dev": true
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
},
"supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"dev": true,
"requires": {
"has-flag": "^1.0.0"
}
}
}
},
"param-case": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",

View File

@ -58,6 +58,7 @@
"lodash": "^4.17.11",
"mkdirp": "^0.5.1",
"node-gyp": "^3.8.0",
"parallel-webpack": "^2.3.0",
"pump": "^3.0.0",
"request-promise-native": "1.0.5",
"sass-lint": "^1.12.1",
@ -82,6 +83,8 @@
"watch_core": "npm run watch --prefix core",
"build_editor": "npm run build --prefix editor",
"watch_editor": "npm run watch --prefix editor",
"build_all": "parallel-webpack --progress --colors --config=webpack.all.config.js",
"watch_all": "parallel-webpack --progress --colors --watch --config=webpack.all.config.js",
"lint": "eslint -f unix client/src core/src editor/src common && npm run sasslint",
"lint_fix": "eslint -f unix client/src core/src",
"sasslint": "sass-lint client/src/styles/**/*.scss -v",

28
webpack.all.config.js Normal file
View File

@ -0,0 +1,28 @@
const path = require('path');
const editor = require('./editor/webpack.config');
editor.output.path = path.resolve('editor', 'dist');
editor.entry = path.resolve('editor', editor.entry);
editor.resolve.alias['vue$'] = path.resolve('node_modules', 'vue', 'dist', 'vue.esm.js');
editor.resolve.modules = [
path.resolve('node_modules'),
path.resolve('common', 'modules')
];
const client = require('./client/webpack.config');
client.output.path = path.resolve('client', 'dist');
client.entry = path.resolve('client', client.entry);
client.resolve.alias['vue$'] = path.resolve('node_modules', 'vue', 'dist', 'vue.esm.js');
client.resolve.modules = [
path.resolve('node_modules'),
path.resolve('common', 'modules'),
path.resolve('client', 'src', 'modules'),
path.resolve('client', 'src', 'ui'),
path.resolve('client', 'src', 'plugins'),
path.resolve('client', 'src', 'structs'),
path.resolve('client', 'src', 'builtin')
];
module.exports = [editor, client];