Skip to content

Commit

Permalink
chore: add new scripts clean:build and clean:modules (#41)
Browse files Browse the repository at this point in the history
- Added `clean:build` script to remove generated build files.
- Added `clean:modules` script to delete the `node_modules` folder
  across packages.
  • Loading branch information
halvaradop authored Oct 10, 2024
1 parent 4c22d84 commit d32de49
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"description": "A comprehensive UI library for React, built with Tailwind CSS and CVA (Class Variance Authority). It provides reusable components and supports JSX syntax.",
"scripts": {
"dev": "turbo run dev --parallel",
"build": "turbo run build",
"build": "turbo run build --filter=*ui-core && turbo build",
"format": "prettier --write .",
"format:check": "prettier --check .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"clean:dist": "pnpm -r --parallel exec rm -rf dist",
"clean:modules": "pnpm -r --parallel exec rm -rf node_modules"
"clean:build": "turbo run clean:build --parallel",
"clean:modules": "turbo run clean:modules --parallel"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"dev": "tsup --watch",
"build": "tsup",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"clean:build": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"dev": "tsup --watch",
"build": "tsup",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"clean:build": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"dev": "tsup --watch",
"build": "tsup",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"clean:build": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"dev": "tsup --watch",
"build": "tsup",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"clean:build": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-label/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"dev": "tsup --watch",
"build": "tsup",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"clean:build": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"repository": {
"type": "git",
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"dev": "tsup --watch",
"build": "tsup",
"format": "prettier --write .",
"format:check": "prettier --check ."
"format:check": "prettier --check .",
"clean:build": "rm -rf dist",
"clean:modules": "rm -rf node_modules"
},
"repository": {
"type": "git",
Expand Down
11 changes: 9 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**/*"],
"inputs": ["packages/**/src/**"],
"outputs": ["dist"],
"inputs": ["src"],
"cache": true
},
"dev": {
"dependsOn": ["^dev"],
"cache": false
},
"clean:build": {
"cache": false
},
"clean:modules": {
"cache": false
}
},
Expand Down

0 comments on commit d32de49

Please sign in to comment.