update npm scripts
This commit is contained in:
parent
f78e392e71
commit
4737c49ed3
4 changed files with 17 additions and 12 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,6 +1,8 @@
|
|||
.DS_Store
|
||||
.bache
|
||||
.docusaurus
|
||||
.env
|
||||
alt
|
||||
app.json
|
||||
build
|
||||
data
|
||||
|
|
@ -13,4 +15,4 @@ pack
|
|||
package-lock.json
|
||||
three.js
|
||||
tmp
|
||||
web/boot/bundle.bin
|
||||
web/boot/bundle*
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@ for (const input of inputs) {
|
|||
const { root, prefix, src, dst } = input;
|
||||
|
||||
if (src && dst) {
|
||||
if (virtMap.has(dst)) {
|
||||
if (!fs.existsSync(src)) {
|
||||
console.log({ src_missing: src });
|
||||
} else if (virtMap.has(dst)) {
|
||||
console.log('pre-existing', dst);
|
||||
} else {
|
||||
entries.push({ file: src, virt: dst });
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ const rec = {
|
|||
logOverride,
|
||||
minify: isProd, // false for dev, true for prod
|
||||
platform: 'browser',
|
||||
sourcemap: !isProd, // true for dev, false for prod
|
||||
sourcemap: false,
|
||||
target: 'es2020',
|
||||
};
|
||||
|
||||
|
|
|
|||
19
package.json
19
package.json
|
|
@ -82,7 +82,7 @@
|
|||
"webpack-cli": "^5.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"setup": "npm run setup-mods && npm i && npm run clean && npm run dev -- --alt --dryrun && npm run webpack-ext",
|
||||
"setup": "npm run setup-mods && npm i && npm run clean && npm run webpack-ext",
|
||||
"setup-mods": "cd mods && npm i",
|
||||
"build": "npm run prebuild && electron-builder",
|
||||
"build-nopublish": "npm run prebuild && electron-builder --publish never",
|
||||
|
|
@ -93,18 +93,17 @@
|
|||
"build-win-arm": "npm run build -- --win --arm64",
|
||||
"build-mac": "npm run build -- --mac --arm64",
|
||||
"build-mac-intel": "npm run build -- --mac --x64",
|
||||
"bundle": "npm run dev -- --alt --dryrun && COMPRESS=1 node bin/bundler.mjs bin/bundle-prod.config.json",
|
||||
"bundle:dev": "npm run dev -- --alt --dryrun && node bin/bundler.mjs",
|
||||
"bundle:prod": "npm run dev -- --alt --dryrun && node bin/bundler.mjs bin/bundle-prod.config.json",
|
||||
"clean": "rm -rf alt build data dist src/pack tmp src.old web.old .bcache",
|
||||
"bundle": "COMPRESS=1 npm run bundle:prod",
|
||||
"bundle:dev": "node bin/bundler.mjs",
|
||||
"bundle:prod": "node bin/bundler.mjs bin/bundle-prod.config.json",
|
||||
"clean": "rm -rf alt build data dist src/pack src.old tmp web.old .bcache",
|
||||
"docs-dev": "docusaurus start --config conf/docusaurus.config.js",
|
||||
"docs-build": "docusaurus build --config conf/docusaurus.config.js",
|
||||
"docs-serve": "docusaurus serve --config conf/docusaurus.config.js",
|
||||
"docs-check": "prettier --config ./conf/prettier.config.js ./docs --check",
|
||||
"dev": "npm run webpack-ext && gs-app-server --debug --single",
|
||||
"prod": "npm run webpack-ext && npm run webpack-src prod && gs-app-server",
|
||||
"prod-pack": "npm run webpack-ext && npm run webpack-src prod && npm run bundle",
|
||||
"prod-dryrun": "gs-app-server --dryrun",
|
||||
"dryrun": "gs-app-server --debug --single --alt --dryrun",
|
||||
"dev": "npm run pack-dev && gs-app-server --debug --single",
|
||||
"prod": "npm run pack-prod && npm run webpack-src prod && gs-app-server",
|
||||
"start": "npm run prebuild prod && electron .",
|
||||
"start-dev": "npm run prebuild prod && electron . --devel",
|
||||
"start-dbg": "npm run prebuild && electron . --debugg",
|
||||
|
|
@ -114,6 +113,8 @@
|
|||
"prebuild": "npm run setup && npm run webpack-src prod && node bin/electron-pre.js",
|
||||
"postbuild": "node bin/electron-post.js",
|
||||
"preinstall": "node bin/install-pre.js",
|
||||
"pack-dev": "npm run dryrun && npm run webpack-src && npm run dryrun && npm run bundle:dev",
|
||||
"pack-prod": "npm run dryrun && npm run webpack-src prod && npm run dryrun && npm run bundle",
|
||||
"webpack-ext": "npm run webpack-three && npm run webpack-zip",
|
||||
"webpack-src": "node bin/esbuild.config.mjs",
|
||||
"webpack-three": "npx webpack --config bin/webpack-three-esm.js",
|
||||
|
|
|
|||
Loading…
Reference in a new issue