Skip to content

Commit 5754750

Browse files
committed
chore: 增加 usehtml 模式
1 parent abd2516 commit 5754750

File tree

3 files changed

+36
-31
lines changed

3 files changed

+36
-31
lines changed

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"predev:taro": "pnpm run update:taro:entry",
6262
"dev:taro": "pnpm --dir ./packages/nutui-taro-demo dev",
6363
"dev:taro:h5": "pnpm dev:taro h5",
64+
"dev:taro:h5:html": "USE_HTML=1 pnpm dev:taro h5",
6465
"predev:jdtaro": "pnpm run update:taro:entry",
6566
"dev:jdtaro": "JD=1 pnpm --dir ./packages/nutui-taro-demo dev",
6667
"dev:jdtaro:jdharmonycpp": "pnpm run clone:jdharmony cpp && pnpm run update:taro:entry && JD=1 pnpm --dir ./packages/nutui-taro-demo dev:jdharmonycpp",
@@ -140,12 +141,12 @@
140141
"@rollup/plugin-typescript": "^11.1.6",
141142
"@shikijs/markdown-it": "^3.0.0",
142143
"@swc/core": "^1.4.8",
143-
"@tarojs/components": "4.0.8-beta.1",
144-
"@tarojs/plugin-platform-alipay": "4.0.8-beta.1",
145-
"@tarojs/plugin-platform-jd": "4.0.8-beta.1",
146-
"@tarojs/plugin-platform-weapp": "4.0.8-beta.1",
147-
"@tarojs/react": "4.0.8-beta.1",
148-
"@tarojs/taro": "4.0.8-beta.1",
144+
"@tarojs/components": "4.0.10-beta.11",
145+
"@tarojs/plugin-platform-alipay": "4.0.10-beta.11",
146+
"@tarojs/plugin-platform-jd": "4.0.10-beta.11",
147+
"@tarojs/plugin-platform-weapp": "4.0.10-beta.11",
148+
"@tarojs/react": "4.0.10-beta.11",
149+
"@tarojs/taro": "4.0.10-beta.11",
149150
"@testing-library/jest-dom": "^6.4.2",
150151
"@testing-library/react": "^16.0.0",
151152
"@types/fs-extra": "^11.0.4",
@@ -239,7 +240,7 @@
239240
"@types/react": "^18.2.57",
240241
"@types/react-dom": "^18.2.19",
241242
"sass": "1.77.6",
242-
"@tarojs/api": "4.0.8-beta.1",
243-
"@tarojs/components": "4.0.8-beta.1"
243+
"@tarojs/api": "4.0.10-beta.11",
244+
"@tarojs/components": "4.0.10-beta.11"
244245
}
245246
}

packages/nutui-taro-demo/config/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ let themeStr = `src/styles/theme-default.scss`
55
const projectID = process.env.VITE_APP_PROJECT_ID
66
const JD = process.env.JD
77
console.log('JDJDJDJDJDJD', JD)
8+
const useHtml = process.env.USE_HTML
9+
console.log('useHtml', useHtml)
10+
811
if (projectID) {
912
fileStr = `src/styles/variables-${projectID}.scss`
1013
themeStr = `src/styles/theme-${projectID}.scss`
@@ -210,6 +213,7 @@ const config = {
210213
},
211214
publicPath: '/',
212215
staticDirectory: 'static',
216+
useHtmlComponents: useHtml === '1',
213217
postcss: {
214218
pxtransform: {
215219
enable: true,

packages/nutui-taro-demo/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,23 @@
6565
"@nutui/touch-emulator": "^1.0.0",
6666
"@nutui/lottie-miniprogram": "^1.0.1",
6767
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
68-
"@tarojs/components": "4.0.8-beta.1",
69-
"@tarojs/helper": "4.0.8-beta.1",
70-
"@tarojs/plugin-framework-react": "4.0.8-beta.1",
71-
"@tarojs/plugin-html": "4.0.8-beta.1",
72-
"@tarojs/plugin-platform-alipay": "4.0.8-beta.1",
73-
"@tarojs/plugin-platform-h5": "4.0.8-beta.1",
74-
"@tarojs/plugin-platform-jd": "4.0.8-beta.1",
75-
"@tarojs/plugin-platform-qq": "4.0.8-beta.1",
76-
"@tarojs/plugin-platform-swan": "4.0.8-beta.1",
77-
"@tarojs/plugin-platform-tt": "4.0.8-beta.1",
78-
"@tarojs/plugin-platform-weapp": "4.0.8-beta.1",
79-
"@tarojs/react": "4.0.8-beta.1",
80-
"@tarojs/router": "4.0.8-beta.1",
81-
"@tarojs/runtime": "4.0.8-beta.1",
82-
"@tarojs/shared": "4.0.8-beta.1",
83-
"@tarojs/taro": "4.0.8-beta.1",
84-
"@tarojs/taro-h5": "4.0.8-beta.1",
68+
"@tarojs/components": "4.0.10-beta.11",
69+
"@tarojs/helper": "4.0.10-beta.11",
70+
"@tarojs/plugin-framework-react": "4.0.10-beta.11",
71+
"@tarojs/plugin-html": "4.0.10-beta.11",
72+
"@tarojs/plugin-platform-alipay": "4.0.10-beta.11",
73+
"@tarojs/plugin-platform-h5": "4.0.10-beta.11",
74+
"@tarojs/plugin-platform-jd": "4.0.10-beta.11",
75+
"@tarojs/plugin-platform-qq": "4.0.10-beta.11",
76+
"@tarojs/plugin-platform-swan": "4.0.10-beta.11",
77+
"@tarojs/plugin-platform-tt": "4.0.10-beta.11",
78+
"@tarojs/plugin-platform-weapp": "4.0.10-beta.11",
79+
"@tarojs/react": "4.0.10-beta.11",
80+
"@tarojs/router": "4.0.10-beta.11",
81+
"@tarojs/runtime": "4.0.10-beta.11",
82+
"@tarojs/shared": "4.0.10-beta.11",
83+
"@tarojs/taro": "4.0.10-beta.11",
84+
"@tarojs/taro-h5": "4.0.10-beta.11",
8585
"babel-plugin-import": "^1.13.8",
8686
"lodash.isequal": "^4.5.0",
8787
"lodash.kebabcase": "^4.1.1",
@@ -93,10 +93,10 @@
9393
},
9494
"devDependencies": {
9595
"@babel/core": "^7.23.9",
96-
"@tarojs/cli": "4.0.8-beta.1",
97-
"@tarojs/plugin-platform-harmony-ets": "4.0.8-beta.1",
98-
"@tarojs/vite-runner": "4.0.8-beta.1",
99-
"@tarojs/webpack5-runner": "4.0.8-beta.1",
96+
"@tarojs/cli": "4.0.10-beta.11",
97+
"@tarojs/plugin-platform-harmony-ets": "4.0.10-beta.11",
98+
"@tarojs/vite-runner": "4.0.10-beta.11",
99+
"@tarojs/webpack5-runner": "4.0.10-beta.11",
100100
"@types/react": "^18.2.57",
101101
"@types/react-dom": "^18.2.19",
102102
"@types/react-router-dom": "^5.3.3",
@@ -106,9 +106,9 @@
106106
"@types/webpack-env": "^1.18.4",
107107
"@typescript-eslint/eslint-plugin": "^7.0.2",
108108
"@typescript-eslint/parser": "^7.0.2",
109-
"babel-preset-taro": "4.0.8-beta.1",
109+
"babel-preset-taro": "4.0.10-beta.11",
110110
"eslint": "^8.56.0",
111-
"eslint-config-taro": "4.0.8-beta.1",
111+
"eslint-config-taro": "4.0.10-beta.11",
112112
"eslint-plugin-import": "^2.29.1",
113113
"eslint-plugin-react": "^7.33.2",
114114
"eslint-plugin-react-hooks": "^4.6.0",

0 commit comments

Comments
 (0)