package: add some log help
This commit is contained in:
parent
d432969fb2
commit
cc3176118e
5 changed files with 19 additions and 17 deletions
|
|
@ -66,9 +66,9 @@
|
|||
"electron-installer-debian": "1.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node scripts/copy-assets.js",
|
||||
"postinstall": "echo '\\033[36m=> Dependencies installed successfully. Run \"npm run build\" to build the assets.\\033[0m\n'",
|
||||
"start": "electron app/",
|
||||
"build": "npm run build-css && npm run build-js && echo 'JS and CSS assets built. To build the binary package, run \"npm run package\".'",
|
||||
"build": "npm run build-css && npm run build-js && node scripts/copy-assets.js && echo '\\033[36m=> JS and CSS assets built successfully. Run \"npm run package\" to build an executable or \"npm start\" to run the app.\\033[0m\n'",
|
||||
"package": "node scripts/package.js",
|
||||
"package-rpi": "node scripts/package.js --rpi",
|
||||
"package-node": "node scripts/package-node.js",
|
||||
|
|
@ -76,10 +76,10 @@
|
|||
"deb64": "electron-installer-debian --src dist/open-stage-control-linux-x64/ --arch amd64 --dest dist/open-stage-control-linux-x64/ --icon resources/images/logo.png",
|
||||
"debarm": "electron-installer-debian --src dist/open-stage-control-linux-armv7l/ --arch armv7l --dest dist/open-stage-control-linux-armv7l/ --icon resources/images/logo.png",
|
||||
"build-css": "node scripts/build-css.js",
|
||||
"build-js": "npm run build-launcher-js && npm run build-client-js -- --prod && npm run build-main-js",
|
||||
"build-js": "npm run build-launcher-js && npm run build-client-js -- --prod && npm run build-server-js",
|
||||
"build-client-js": "node scripts/build-client.js",
|
||||
"build-launcher-js": "node scripts/build-launcher.js",
|
||||
"build-main-js": "node scripts/build-main.js",
|
||||
"build-server-js": "node scripts/build-server.js",
|
||||
"watch-client": "npm run build-client-js -- --watch",
|
||||
"watch-browser": "npm run build-client-js -- --watch",
|
||||
"watch-css": "nodemon --watch src/scss -e scss -x \"npm run build-css -- --reload",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ var transforms = [
|
|||
]
|
||||
|
||||
if (prod) {
|
||||
console.warn('\x1b[36m%s\x1b[0m', 'Building minified js bundle for production... This may take a while... ')
|
||||
console.warn('\x1b[36m%s\x1b[0m', '=> Building minified client bundle, this may take a while...')
|
||||
transforms.push([transformWrapper(require('uglifyify')), {global: true}])
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
var build = require('./build')
|
||||
|
||||
build({
|
||||
input: '../src/main/index.js',
|
||||
output: '../app/main/open-stage-control-server.js',
|
||||
input: '../src/server/index.js',
|
||||
output: '../app/server/open-stage-control-server.js',
|
||||
options: {
|
||||
commonDir: false,
|
||||
ignoreMissing: true,
|
||||
|
|
|
|||
|
|
@ -4,15 +4,13 @@ var browserify = require('browserify'),
|
|||
fs = require('fs'),
|
||||
cpr = require('cpr'),
|
||||
path = require('path'),
|
||||
files = [
|
||||
['../app', '../dist/open-stage-control-node']
|
||||
]
|
||||
files = ['../app', '../dist/open-stage-control-node']
|
||||
|
||||
for (let i in files) {
|
||||
cpr(...files.map(f => path.resolve(__dirname + '/' + f)), {
|
||||
filter: /node_modules\/(serialport|uws)/,
|
||||
overwrite: true
|
||||
}, ()=>{
|
||||
|
||||
cpr(...files[i].map(f => path.resolve(__dirname + '/' + f)), {
|
||||
filter: /node_modules\/(serialport|uws)/,
|
||||
overwrite: true
|
||||
})
|
||||
console.warn('\x1b[36m%s\x1b[0m', '=> Build artifacts created in ' + path.resolve(__dirname + '/../dist'))
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@ packager({
|
|||
ignore: /node_modules\/(serialport|uws)/,
|
||||
afterExtract: [safeFFMPEG],
|
||||
prune: false
|
||||
}).then(()=>{})
|
||||
}).then(()=>{
|
||||
|
||||
console.warn('\x1b[36m%s\x1b[0m', '=> Build artifacts created in ' + path.resolve(__dirname + '/../dist'))
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue