mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Add cleanup script
This commit is contained in:
+29
-2
@@ -84,6 +84,33 @@ const cleanAdmin = () => deleteAsync([
|
|||||||
'dist/browser/assets-admin',
|
'dist/browser/assets-admin',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const cleanAll = () => deleteAsync([
|
||||||
|
'node_modules',
|
||||||
|
'dist',
|
||||||
|
'dist/**',
|
||||||
|
'build',
|
||||||
|
'build/**',
|
||||||
|
'build-snapshot',
|
||||||
|
'build-snapshot/**',
|
||||||
|
'logs',
|
||||||
|
'logs/**',
|
||||||
|
'settings',
|
||||||
|
'settings/**',
|
||||||
|
'.cache',
|
||||||
|
'.cache/**',
|
||||||
|
'src/ts/generated/*',
|
||||||
|
'!src/ts/generated/gamepad-template.ts',
|
||||||
|
'!src/ts/generated/gamepad-mappings.ts',
|
||||||
|
'assets/images/pony.png',
|
||||||
|
'assets/images/pony2.png',
|
||||||
|
'assets/images/pony2a.png',
|
||||||
|
'config.json',
|
||||||
|
'.idea',
|
||||||
|
'.idea/**',
|
||||||
|
'.vs',
|
||||||
|
'.vs/**',
|
||||||
|
]);
|
||||||
|
|
||||||
const manifest = cb => {
|
const manifest = cb => {
|
||||||
const json = {
|
const json = {
|
||||||
name: config.title,
|
name: config.title,
|
||||||
@@ -407,9 +434,8 @@ const spritesTask = argv.sprites ? sprites : empty;
|
|||||||
// dirs, different inputs), so they can run in parallel with each other and with
|
// dirs, different inputs), so they can run in parallel with each other and with
|
||||||
// the assets/sass branch. webpack is the long pole, so assets/sass are hidden
|
// the assets/sass branch. webpack is the long pole, so assets/sass are hidden
|
||||||
// behind it. sw + size must wait for all of them.
|
// behind it. sw + size must wait for all of them.
|
||||||
const build = gulp.series(clean, setProd, gulp.parallel(
|
const build = gulp.series(clean, setProd, gulp.series(assets, sassTasks), gulp.parallel(
|
||||||
gulp.series(codegen, gulp.parallel(ts, webpackProd)),
|
gulp.series(codegen, gulp.parallel(ts, webpackProd)),
|
||||||
gulp.series(assets, sassTasks)
|
|
||||||
), sw, size);
|
), sw, size);
|
||||||
const admin = gulp.series(cleanAdmin, setProd, sassAdmin, ts, webpackAdmin);
|
const admin = gulp.series(cleanAdmin, setProd, sassAdmin, ts, webpackAdmin);
|
||||||
const dev = gulp.series(clean, spritesTask, common, gulp.parallel(serverDev, watch, watchTools));
|
const dev = gulp.series(clean, spritesTask, common, gulp.parallel(serverDev, watch, watchTools));
|
||||||
@@ -418,6 +444,7 @@ export {
|
|||||||
music,
|
music,
|
||||||
admin,
|
admin,
|
||||||
build,
|
build,
|
||||||
|
cleanAll as clean,
|
||||||
dev,
|
dev,
|
||||||
sprites,
|
sprites,
|
||||||
patchWebWorkerTask as patchWebWorker,
|
patchWebWorkerTask as patchWebWorker,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
"webpack-stats": "npm run webpack-prod -- --env debug --json > stats.json",
|
"webpack-stats": "npm run webpack-prod -- --env debug --json > stats.json",
|
||||||
"webpack-verbose": "npm run webpack-prod -- --verbose",
|
"webpack-verbose": "npm run webpack-prod -- --verbose",
|
||||||
"wds": "webpack-dev-server --config webpack.dev.mjs --progress --color --port 8091",
|
"wds": "webpack-dev-server --config webpack.dev.mjs --progress --color --port 8091",
|
||||||
|
"clean": "gulp clean",
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"build-sprites": "npm run ts-tools && gulp sprites && npm run build",
|
"build-sprites": "npm run ts-tools && gulp sprites && npm run build",
|
||||||
"build-beta": "npm run build -- --beta --tools",
|
"build-beta": "npm run build -- --beta --tools",
|
||||||
|
|||||||
Reference in New Issue
Block a user