Merge remote-tracking branch 'upstream/master' into merge-upstream-1
# Conflicts: # esbuild.config.mjs # package.json
This commit is contained in:
commit
392979ce45
|
@ -1,2 +1,3 @@
|
||||||
npm node_modules
|
node_modules/
|
||||||
build
|
|
||||||
|
main.js
|
||||||
|
|
|
@ -9,9 +9,9 @@ if you want to view the source, please visit the github repository of this plugi
|
||||||
*/
|
*/
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const prod = (process.argv[2] === 'production');
|
const prod = (process.argv[2] === "production");
|
||||||
|
|
||||||
esbuild.build({
|
const context = await esbuild.context({
|
||||||
banner: {
|
banner: {
|
||||||
js: banner,
|
js: banner,
|
||||||
},
|
},
|
||||||
|
@ -41,3 +41,10 @@ esbuild.build({
|
||||||
treeShaking: true,
|
treeShaking: true,
|
||||||
outfile: 'dist/main.js',
|
outfile: 'dist/main.js',
|
||||||
}).catch(() => process.exit(1));
|
}).catch(() => process.exit(1));
|
||||||
|
|
||||||
|
if (prod) {
|
||||||
|
await context.rebuild();
|
||||||
|
process.exit(0);
|
||||||
|
} else {
|
||||||
|
await context.watch();
|
||||||
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "5.29.0",
|
"@typescript-eslint/eslint-plugin": "5.29.0",
|
||||||
"@typescript-eslint/parser": "5.29.0",
|
"@typescript-eslint/parser": "5.29.0",
|
||||||
"builtin-modules": "3.3.0",
|
"builtin-modules": "3.3.0",
|
||||||
"esbuild": "0.14.47",
|
"esbuild": "0.17.3",
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.29.0",
|
||||||
"jest": "^28.1.1",
|
"jest": "^28.1.1",
|
||||||
"monkey-around": "^2.3.0",
|
"monkey-around": "^2.3.0",
|
||||||
|
|
Loading…
Reference in New Issue