Skip to content

Chrome DevTools for coding agents

build: ensure the build folder is clean (#437)

Alex Rudenko873088f6bd69
diff --git a/package.json b/package.json
index ee5d1cb7..10e165f8 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
"bin": "./build/src/index.js",
"main": "index.js",
"scripts": {
- "build": "tsc && node --experimental-strip-types --no-warnings=ExperimentalWarning scripts/post-build.ts && rollup -c rollup.config.mjs",
+ "clean": "node -e \"require('fs').rmSync('build', {recursive: true, force: true})\"",
+ "build": "npm run clean && tsc && node --experimental-strip-types --no-warnings=ExperimentalWarning scripts/post-build.ts && rollup -c rollup.config.mjs",
"typecheck": "tsc --noEmit",
"format": "eslint --cache --fix . && prettier --write --cache .",
"check-format": "eslint --cache . && prettier --check --cache .;",