Skip to content

Commit a8f12ad

Browse files
chore: 添加 npm run clean 脚本清理构建产物
1 parent 3cc1e4c commit a8f12ad

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ bundle exec jekyll s -l # 启动 Jekyll (livereload)
7373
| `npm run watch` | JS 监听模式 |
7474
| `npm run dev` | 构建 + 启动开发服务器 |
7575
| `npm test` | 构建站点 + HTML 校验 |
76+
| `npm run clean` | 清理所有构建产物,恢复干净状态 |
7677

7778
### 写文章
7879

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"build": "BUILD=production npx rollup -c --bundleConfigAsCjs",
1111
"watch": "npx rollup -c --bundleConfigAsCjs -w",
1212
"dev": "npm run build && bash _scripts/run.sh",
13-
"test": "bash _scripts/test.sh"
13+
"test": "bash _scripts/test.sh",
14+
"clean": "rm -rf assets/js/dist _site .jekyll-cache .jekyll-metadata node_modules && echo '✅ 已清理所有构建产物'"
1415
},
1516
"devDependencies": {
1617
"@babel/core": "^7.24.0",

0 commit comments

Comments
 (0)