diff --git a/package.json b/package.json index 07a6d03..ebdf0f1 100644 --- a/package.json +++ b/package.json @@ -46,20 +46,21 @@ ], "scripts": { "create": "esno scripts/create-package.ts", - "dev": "pnpm --filter=utils-playground dev --port 9999 --open --host", "watch": "esno scripts/watch-package.ts", - "build": "pnpm --filter \"@vtrbo/utils-*\" build && tsup", - "release": "pnpm build && pnpm release:bumpp && pnpm release:publish", - "release:bumpp": "bumpp -r", - "release:publish": "pnpm --filter \"@vtrbo/utils-*\" publish --access=public && pnpm publish --access=public", + "build": "pnpm build:packages && tsup", + "build:packages": "pnpm -r --filter=!playground build", + "dev:playground": "pnpm -C playground dev", + "build:playground": "pnpm -C playground build", + "release": "pnpm build && bumpp -r && pnpm release:publish", + "release:publish": "pnpm -r --filter=!playground publish --access=public", "lint": "eslint .", "lint:fix": "eslint . --fix", "test": "vitest", "test:update": "vitest -u", "test:coverage": "vitest --coverage", "clean": "pnpm clean:dist && pnpm clean:deps", - "clean:dist": "rimraf packages/**/dist && rimraf dist", - "clean:deps": "rimraf packages/**/node_modules playground/node_modules && rimraf node_modules", + "clean:dist": "pnpm -r clean:dist && rimraf dist", + "clean:deps": "pnpm -r clean:deps && rimraf node_modules", "prepare": "npx simple-git-hooks", "precommit": "esno verify-commit.ts" }, diff --git a/packages/is/package.json b/packages/is/package.json index 4a8fc20..da8d8a1 100644 --- a/packages/is/package.json +++ b/packages/is/package.json @@ -45,7 +45,10 @@ "index.js" ], "scripts": { - "build": "tsup" + "build": "tsup", + "clean": "pnpm clean:dist && pnpm clean:deps", + "clean:dist": "rimraf dist", + "clean:deps": "rimraf node_modules" }, "peerDependencies": { "@vtrbo/utils-obj": "workspace:*" diff --git a/packages/log/package.json b/packages/log/package.json index 849f8a1..924b26c 100644 --- a/packages/log/package.json +++ b/packages/log/package.json @@ -45,7 +45,10 @@ "index.js" ], "scripts": { - "build": "tsup" + "build": "tsup", + "clean": "pnpm clean:dist && pnpm clean:deps", + "clean:dist": "rimraf dist", + "clean:deps": "rimraf node_modules" }, "dependencies": { "@vtrbo/utils-tool": "workspace:*" diff --git a/packages/obj/package.json b/packages/obj/package.json index 952506a..967e9d1 100644 --- a/packages/obj/package.json +++ b/packages/obj/package.json @@ -45,7 +45,10 @@ "index.js" ], "scripts": { - "build": "tsup" + "build": "tsup", + "clean": "pnpm clean:dist && pnpm clean:deps", + "clean:dist": "rimraf dist", + "clean:deps": "rimraf node_modules" }, "peerDependencies": { "@vtrbo/utils-is": "workspace:*" diff --git a/packages/tool/package.json b/packages/tool/package.json index a117711..303c269 100644 --- a/packages/tool/package.json +++ b/packages/tool/package.json @@ -45,6 +45,9 @@ "index.js" ], "scripts": { - "build": "tsup" + "build": "tsup", + "clean": "pnpm clean:dist && pnpm clean:deps", + "clean:dist": "rimraf dist", + "clean:deps": "rimraf node_modules" } } diff --git a/playground/package.json b/playground/package.json index 7080d7c..bedc611 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,5 +1,5 @@ { - "name": "utils-playground", + "name": "playground", "type": "module", "version": "0.4.0-beta.4", "description": "Collection of common JavaScript or TypeScript utils.", @@ -21,7 +21,10 @@ ], "scripts": { "dev": "vite", - "build": "vite build" + "build": "vite build", + "clean": "pnpm clean:dist && pnpm clean:deps", + "clean:dist": "rimraf dist", + "clean:deps": "rimraf node_modules" }, "dependencies": { "vue": "^3.3.4"