Browse Source

enhance(dev): optimize the build flow for the ui package

charlie 1 year ago
parent
commit
450b23711e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      packages/ui/package.json

+ 2 - 1
packages/ui/package.json

@@ -9,7 +9,8 @@
     "build:ui": "rm -rf .parcel-cache && yarn build:ui:only",
     "watch:storybook": "storybook dev -p 6006",
     "install:primitives": "rm -rf primitives/ && git clone https://github.com/xyhp915/primitives.git --depth=1",
-    "preinstall": "yarn install:primitives && cd primitives/ && yarn install && yarn build",
+    "build:primitives": "yarn install:primitives && cd primitives/ && yarn install && yarn build",
+    "preinstall": "test -f primitives/package.json || yarn build:primitives",
     "postinstall": "yarn build:ui"
   },
   "dependencies": {