feat: added cleanup script

This commit is contained in:
Haoyu Xu
2025-04-26 18:09:45 +08:00
parent b5c3361dd2
commit 1e7735203d
8 changed files with 39 additions and 10 deletions

View File

@@ -20,9 +20,9 @@ jobs:
with:
run_install: true
- name: Download Data
run: pnpm run download:data
- name: Build
run: pnpm run build
run: pnpm run download:data --cache=
- name: Build and Clean Up
run: pnpm run build:cleanup --cache=
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:

View File

@@ -13,7 +13,8 @@
"download:game": "turbo run download:game",
"upload": "turbo run upload",
"download:data": "turbo run download:data",
"deploy": "turbo run deploy"
"deploy": "turbo run deploy",
"build:cleanup": "turbo run build:cleanup"
},
"devDependencies": {
"eslint": "^9.25.1",

View File

@@ -16,6 +16,7 @@
"scripts": {
"build": "mode=build node runner.js",
"download:game": "mode=download node runner.js",
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check ."
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check .",
"build:cleanup": "rm -rf ./dist"
}
}

View File

@@ -14,6 +14,7 @@
},
"scripts": {
"build": "mode=build node runner.js",
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check ."
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check .",
"build:cleanup": "rm -rf ./dist ./data"
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"update": "mode=update node runner.js",
"build": "mode=build node runner.js",
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check ."
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check .",
"build:cleanup": "rm -rf ./dist"
}
}

View File

@@ -13,6 +13,7 @@
},
"scripts": {
"update": "mode=update node runner.js",
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check ."
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check .",
"build:cleanup": "rm -rf ./data"
}
}

View File

@@ -15,6 +15,7 @@
"scripts": {
"build": "mode=build node runner.js",
"init": "mode=init node runner.js",
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check ."
"lint": "eslint \"*.js\" \"**/*.js\" && prettier --check .",
"build:cleanup": "rm -rf ./dist ./data"
}
}

View File

@@ -125,6 +125,29 @@
"deploy": {
"env": ["CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_API_TOKEN"],
"cache": false
},
"@aklive2d/assets#build:cleanup": {
"cache": false,
"dependsOn": ["@aklive2d/directory#build"]
},
"@aklive2d/background#build:cleanup": {
"cache": false,
"dependsOn": ["@aklive2d/directory#build"]
},
"@aklive2d/charword-table#build:cleanup": {
"cache": false,
"dependsOn": ["@aklive2d/directory#build"]
},
"@aklive2d/music#build:cleanup": {
"cache": false,
"dependsOn": ["@aklive2d/directory#build"]
},
"@aklive2d/operator#build:cleanup": {
"cache": false,
"dependsOn": ["@aklive2d/directory#build"]
},
"build:cleanup": {
"cache": false
}
}
}