diff --git a/package.json b/package.json index 2a1db63..1e54d00 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "private": true, "scripts": { "preinstall": "npx only-allow pnpm", - "inits": "pnpm install", - "clean-dist": "rimraf 'packages/hooks/{lib,es,node_modules,dist}'", - "clean": "pnpm run clean-dist && rimraf node_modules", + "all": "pnpm install", + "clean-dist": "pnpm -r --filter=./packages/* run clearDist", + "clean": "pnpm -r --filter=./packages/* run clean && rimraf node_modules", "build": "pnpm -r --filter=./packages/* run build", - "pub": "pnpm run build && pnpm -r --filter=./packages/* publish --access=public", + "pub": "pnpm run clean-dist && pnpm run build && pnpm -r --filter=./packages/* publish --access=public", "pub:beta": "pnpm run build && pnpm -r --filter=./packages/* publish --tag beta", "format": "prettier --write packages/ --fix", "eslint": "eslint --fix ./packages/**/*.{js,ts} ", diff --git a/packages/hooks/package.json b/packages/hooks/package.json index 35bc86a..618aefb 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -6,9 +6,9 @@ "module": "./es/index.js", "unpkg": "./dist/zhongjiayao_v3_hooks", "scripts": { - "build": "node scripts/build.mjs", - "clearDist": "rimraf dist", - "test": "echo \"Error: no test specified\" && exit 1" + "clean": "rimraf node_modules", + "clearDist": "rimraf dist lib es", + "build": "node scripts/build.mjs" }, "keywords": [ "encode",