Skip to content

Commit

Permalink
fix: add clean script
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Mar 27, 2024
1 parent 22ac275 commit 378fdeb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -3,6 +3,7 @@
"version": "1.6.0",
"description": "picgo plugin for siyuan-note",
"scripts": {
"clean": "./scripts/clean.sh",
"serve": "turbo run serve",
"dev": "turbo run dev",
"build": "turbo run build",
Expand Down
8 changes: 8 additions & 0 deletions scripts/clean.sh
@@ -0,0 +1,8 @@
#!/bin/sh

find . -name "node_modules" -type d -exec rm -rf {} +
find . -name "dist" -type d -exec rm -rf {} +
find . -name ".turbo" -type d -exec rm -rf {} +
rm -rf ./artifacts
rm -rf ./build
echo "clean finished."
9 changes: 2 additions & 7 deletions scripts/package.py
Expand Up @@ -9,13 +9,8 @@
# 获取当前工作空间
cwd = scriptutils.get_workdir()

# os.system("find . -name "node_modules" -type d -exec rm -rf {} +")
# os.system("find . -name "dist" -type d -exec rm -rf {} +")
# os.system("find . -name ".turbo" -type d -exec rm -rf {} +")
# os.system("rm -rf ./artifacts")
# os.system("rm -rf ./build")
os.system("pnpm build -F picgo-plugin-app")
os.system("pnpm build -F picgo-plugin-bootstrap")
os.system("pnpm build -F picgo-plugin-app --force")
os.system("pnpm build -F picgo-plugin-bootstrap --force")

dist_folder = "./artifacts/siyuan-plugin-picgo/dist"
data = scriptutils.read_json_file(cwd + "package.json")
Expand Down

0 comments on commit 378fdeb

Please sign in to comment.