Skip to content

Commit

Permalink
docs: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sonofmagic committed Jan 17, 2025
1 parent 98f9262 commit 638f885
Show file tree
Hide file tree
Showing 12 changed files with 2,196 additions and 970 deletions.
31 changes: 30 additions & 1 deletion benchmark/data/2025-01-18.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,36 @@
"babel": [
241.916792,
141.3138340000005,
356.30683399999907
356.30683399999907,
189.94537500000024,
134.12154199999986,
377.3839160000007,
169.32712499999616,
121.83245799998986,
355.61350000000675,
181.5567089999995,
129.81787499999973,
408.1113750000004,
166.50966600001266,
138.32391700000153,
368.6032500000001,
121.94170799999847,
116.07533300000068,
368.4416659999988,
164.072833000042,
119.00658300000941,
361.505291999958,
159.873666999978,
113.58987500000512,
368.0659999999916
],
"ast-grep": [
78.3452499999994,
116.77170899999965,
213.69575000000077,
50.29845900000055,
119.84929199999988,
228.80133299999943
]
},
"taro-vue2": {
Expand Down
10 changes: 9 additions & 1 deletion demo/taro-app-vite/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,20 @@ export default defineConfig<'vite'>(async (merge, { command, mode }) => {
uvtw({
rem2rpx: true,
// 除了小程序这些,其他平台都 disabled
disabled: process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'harmony' || process.env.TARO_ENV === 'rn'
disabled: process.env.TARO_ENV === 'h5' || process.env.TARO_ENV === 'harmony' || process.env.TARO_ENV === 'rn',
injectAdditionalCssVarScope: true,
})
] as Plugin[]
},
mini: {
// https://taro-docs.jd.com/docs/config-detail#minipostcss
postcss: {
// htmltransform: {
// enable: true,
// config: {
// removeCursorStyle: false,
// },
// },
pxtransform: {
enable: true,
config: {
Expand Down
66 changes: 33 additions & 33 deletions demo/taro-app-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,54 +48,54 @@
"maintained node versions"
],
"dependencies": {
"@babel/runtime": "^7.24.4",
"@tarojs/components": "4.0.6",
"@tarojs/helper": "4.0.6",
"@tarojs/plugin-framework-react": "4.0.6",
"@tarojs/plugin-platform-alipay": "4.0.6",
"@tarojs/plugin-platform-h5": "4.0.6",
"@tarojs/plugin-platform-harmony-hybrid": "4.0.6",
"@tarojs/plugin-platform-jd": "4.0.6",
"@tarojs/plugin-platform-qq": "4.0.6",
"@tarojs/plugin-platform-swan": "4.0.6",
"@tarojs/plugin-platform-tt": "4.0.6",
"@tarojs/plugin-platform-weapp": "4.0.6",
"@tarojs/react": "4.0.6",
"@tarojs/runtime": "4.0.6",
"@tarojs/shared": "4.0.6",
"@tarojs/taro": "4.0.6",
"@babel/runtime": "^7.26.0",
"@tarojs/components": "4.0.9",
"@tarojs/helper": "4.0.9",
"@tarojs/plugin-framework-react": "4.0.9",
"@tarojs/plugin-platform-alipay": "4.0.9",
"@tarojs/plugin-platform-h5": "4.0.9",
"@tarojs/plugin-platform-harmony-hybrid": "4.0.9",
"@tarojs/plugin-platform-jd": "4.0.9",
"@tarojs/plugin-platform-qq": "4.0.9",
"@tarojs/plugin-platform-swan": "4.0.9",
"@tarojs/plugin-platform-tt": "4.0.9",
"@tarojs/plugin-platform-weapp": "4.0.9",
"@tarojs/react": "4.0.9",
"@tarojs/runtime": "4.0.9",
"@tarojs/shared": "4.0.9",
"@tarojs/taro": "4.0.9",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@babel/core": "^7.24.4",
"@babel/core": "^7.26.0",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/preset-react": "^7.24.1",
"@tarojs/cli": "4.0.6",
"@tarojs/vite-runner": "4.0.6",
"@babel/preset-react": "^7.26.3",
"@tarojs/cli": "4.0.9",
"@tarojs/vite-runner": "4.0.9",
"@types/react": "^18.3.11",
"@vitejs/plugin-react": "^4.3.2",
"@vitejs/plugin-react": "^4.3.4",
"@weapp-tailwindcss/cli": "^3.0.0",
"@weapp-tailwindcss/merge": "^1.0.0-alpha.2",
"autoprefixer": "^10.4.20",
"babel-preset-taro": "4.0.6",
"eslint": "^8.57.0",
"eslint-config-taro": "4.0.6",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^4.4.0",
"postcss": "^8.4.47",
"babel-preset-taro": "4.0.9",
"eslint": "^9.18.0",
"eslint-config-taro": "4.0.9",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"postcss": "^8.5.1",
"postcss-rem-to-responsive-pixel": "^6.0.2",
"postcss-rpx-transform": "^1.0.1",
"react-refresh": "^0.14.0",
"sass": "^1.79.4",
"stylelint": "^16.9.0",
"react-refresh": "^0.16.0",
"sass": "^1.83.4",
"stylelint": "^16.13.2",
"tailwind-css-variables-theme-generator": "^0.4.0",
"tailwindcss": "^3.4.17",
"tailwindcss-patch": "^5.0.2",
"tailwindcss-rem2px-preset": "^1.0.3",
"terser": "^5.34.1",
"typescript": "^5.6.2",
"vite": "^4.2.0",
"terser": "^5.37.0",
"typescript": "^5.7.3",
"vite": "^6.0.7",
"weapp-ide-cli": "^2.0.9",
"weapp-tailwindcss": "^4.0.0-alpha.6",
"weapp-tailwindcss-children": "^0.1.0"
Expand Down
14 changes: 10 additions & 4 deletions demo/taro-app-vite/src/pages/index/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ import { View, Text } from '@tarojs/components'
import { useLoad } from '@tarojs/taro'
import './index.scss'

export default function Index () {
export default function Index() {
useLoad(() => {
console.log('Page loaded.')
})

return (
<View className='bg-[#89ab8d] flex flex-col'>
<Text className='text-[#438821] before:content-["11111"]'>Hello world!</Text>
<Text className='text-[#3d31a4] before:content-["222"]'>Hello world!</Text>
<View>
<View className='bg-[#89ab8d] flex flex-col'>
<View className='text-[#438821] dark:text-[#ec4f4f] before:content-["11111"]'>Hello world!</View>
<View className='text-[#3d31a4] before:content-["222"]'>Hello world!</View>
</View>
<View className='bg-[#89ab8d] flex divide-x-8 divide-solid divide-[#60d256]'>
<View className='text-[#438821] dark:text-[#ec4f4f] before:content-["11111"]'>Hello world!</View>
<View className='text-[#3d31a4] before:content-["222"]'>Hello world!</View>
</View>
</View>
)
}
Loading

0 comments on commit 638f885

Please sign in to comment.