Skip to content

Commit 1ff7eaf

Browse files
committed
Enhance build scripts: clean up dist and public/chartifact, add asset copying and prebuild step
1 parent 7e39849 commit 1ff7eaf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/editor/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
"main": "dist/esnext/index.js",
77
"types": "dist/esnext/index.d.ts",
88
"scripts": {
9-
"clean": "rimraf dist",
9+
"clean": "rimraf dist && rimraf public/chartifact",
10+
"copy-assets": "mkdir -p public/chartifact/dist/v1 && cp -r ../../docs/dist/v1/* public/chartifact/dist/v1/ 2>/dev/null || echo 'Assets not found, run npm run build in workspace root first'",
11+
"predev": "npm run copy-assets",
1012
"dev": "vite --config vite.config.js",
13+
"prebuild": "npm run clean",
1114
"tsc": "tsc -p .",
1215
"bundle": "vite build --config vite.bundle.config.js",
1316
"build": "npm run tsc",

0 commit comments

Comments
 (0)