From a6d08791ec535cc2248aae2901ad9ef370792a75 Mon Sep 17 00:00:00 2001 From: Eiinu Date: Sun, 19 Nov 2023 16:06:58 +0800 Subject: [PATCH] chore: update package.json scripts --- .github/workflows/ci.yml | 6 +++--- package.json | 18 ++++++++---------- packages/nutui-taro-demo/package.json | 20 ++------------------ 3 files changed, 13 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 751b6c46fa..f4e35965c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,10 +75,10 @@ jobs: run: pnpm build - name: Build NutUI-Taro - run: pnpm build:taro:vue + run: pnpm build:taro - name: Build NutUI Demo - run: pnpm build:site + run: pnpm build:demo - name: Build NutUI-Taro Demo - run: pnpm build:taro:h5 + run: pnpm build:h5 diff --git a/package.json b/package.json index a03f97e6ed..0a268210fa 100644 --- a/package.json +++ b/package.json @@ -39,16 +39,14 @@ "preinstall": "npx only-allow pnpm", "prepare": "husky install && node scripts/generate-nutui.cjs && node scripts/generate-nutui-taro-vue.cjs && node ./scripts/generate-taro-route.cjs", "dev": "vite --open --force", - "dev:taro:weapp": "pnpm --dir ./packages/nutui-taro-demo dev:weapp", - "dev:taro:alipay": "pnpm --dir ./packages/nutui-taro-demo dev:alipay", - "dev:taro:jd": "pnpm --dir ./packages/nutui-taro-demo dev:jd", - "dev:taro:h5": "pnpm --dir ./packages/nutui-taro-demo dev:h5", - "dev:taro:tt": "pnpm --dir ./packages/nutui-taro-demo dev:tt", - "build:taro:h5": "pnpm --dir ./packages/nutui-taro-demo build:h5", - "build:taro:weapp": "pnpm --dir ./packages/nutui-taro-demo build:weapp", - "build:site": "vue-tsc --declaration --emitDeclarationOnly -p ./tsconfig.json && vite build", + "dev:h5": "pnpm --dir ./packages/nutui-taro-demo dev h5", + "dev:weapp": "pnpm --dir ./packages/nutui-taro-demo dev weapp", + "dev:taro": "pnpm --dir ./packages/nutui-taro-demo dev", + "build:demo": "vue-tsc --declaration --emitDeclarationOnly -p ./tsconfig.json && vite build", + "build:h5": "pnpm --dir ./packages/nutui-taro-demo build h5", + "build:weapp": "pnpm --dir ./packages/nutui-taro-demo build weapp", "build": "vite build --config vite.config.build.ts && vite build --config vite.config.build.disperse.ts && pnpm generate:themes && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && vite build --config vite.config.build.resolver.ts && pnpm dts && pnpm attrs && node scripts/generate-unplugin-deps.cjs nutui && node scripts/copy-dist.cjs nutui", - "build:taro:vue": "vite build --config vite.config.build.taro.vue.ts && vite build --config vite.config.build.taro.vue.disperse.ts && pnpm generate:themes:taro && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && vite build --config vite.config.build.resolver.ts && pnpm dts:taro && pnpm attrs:taro && node scripts/generate-unplugin-deps.cjs nutui-taro && node scripts/copy-dist.cjs nutui-taro", + "build:taro": "vite build --config vite.config.build.taro.vue.ts && vite build --config vite.config.build.taro.vue.disperse.ts && pnpm generate:themes:taro && vite build --config vite.config.build.css.ts && vite build --config vite.config.build.locale.ts && vite build --config vite.config.build.resolver.ts && pnpm dts:taro && pnpm attrs:taro && node scripts/generate-unplugin-deps.cjs nutui-taro && node scripts/copy-dist.cjs nutui-taro", "add": "node scripts/createComponentMode.js", "generate:types": "rimraf ./dist/types && node scripts/generate-types.cjs", "generate:types:taro": "rimraf ./dist/types && node scripts/generate-types-taro.cjs", @@ -60,8 +58,8 @@ "lint": "eslint ./src ./packages/**/src --ext .vue,.ts,.tsx,.js,.jsx", "lint:fix": "pnpm lint --fix", "copydocs": "node ./scripts/copymd.cjs", - "attrs:taro": "node ./scripts/createAttributes.cjs taro", "attrs": "node ./scripts/createAttributes.cjs", + "attrs:taro": "node ./scripts/createAttributes.cjs taro", "dts": "rimraf ./tsc/type && vue-tsc --declaration --emitDeclarationOnly -p ./tsconfig.declaration.json && pnpm generate:types", "dts:taro": "rimraf ./tsc/type && vue-tsc --declaration --emitDeclarationOnly -p ./tsconfig.declaration.taro.json && pnpm generate:types:taro", "copy:h5": "node ./scripts/copyh5.cjs", diff --git a/packages/nutui-taro-demo/package.json b/packages/nutui-taro-demo/package.json index 895db33c7b..848967cea6 100644 --- a/packages/nutui-taro-demo/package.json +++ b/packages/nutui-taro-demo/package.json @@ -9,24 +9,8 @@ "css": "sass" }, "scripts": { - "build:weapp": "taro build --type weapp", - "build:swan": "taro build --type swan", - "build:alipay": "taro build --type alipay", - "build:tt": "taro build --type tt", - "build:h5": "taro build --type h5", - "build:rn": "taro build --type rn", - "build:qq": "taro build --type qq", - "build:jd": "taro build --type jd", - "build:quickapp": "taro build --type quickapp", - "dev:weapp": "npm run build:weapp -- --watch", - "dev:swan": "npm run build:swan -- --watch", - "dev:alipay": "npm run build:alipay -- --watch", - "dev:tt": "npm run build:tt -- --watch", - "dev:h5": "npm run build:h5 -- --watch", - "dev:rn": "npm run build:rn -- --watch", - "dev:qq": "npm run build:qq -- --watch", - "dev:jd": "npm run build:jd -- --watch", - "dev:quickapp": "npm run build:quickapp -- --watch" + "dev": "taro build --watch --type", + "build": "taro build --type" }, "browserslist": [ "last 3 versions",