Skip to content

Commit

Permalink
moved clean script to a bash script and fixing script to remove folders
Browse files Browse the repository at this point in the history
Signed-off-by: Luiz Bezerra <[email protected]>
  • Loading branch information
luluiz committed Oct 18, 2024
1 parent 12f2ba6 commit 2f5394b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions ci/clean-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Clean and build TypeScript packages
tsc --build --clean packages/**/tsconfig.json

# Define the folders to be removed in an array
folders_to_remove=(
".webpack"
"*/.webpack"
"dist"
"storybook-screenshots"
"storybook-static"
"coverage"
"desktop/integration-test/coverage"
"web/integration-test/coverage"
)

# Remove the folders
for folder in "${folders_to_remove[@]}"; do
rimraf "$folder"
done

# Display completion message
echo "Build cleaned and folders removed successfully."
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"node": ">=16"
},
"scripts": {
"clean": "tsc --build --clean packages/**/tsconfig.json && rimraf .webpack */.webpack dist storybook-screenshots storybook-static coverage",
"clean": "bash ci/clean-build.sh",
"build:packages": "tsc --build --verbose packages/*/tsconfig.json packages/*/src/*/tsconfig.json",
"desktop:build:dev": "webpack --mode development --progress --config desktop/webpack.config.ts",
"desktop:build:prod": "webpack --mode production --progress --config desktop/webpack.config.ts",
Expand Down

0 comments on commit 2f5394b

Please sign in to comment.