Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(taro-hooks): lock version to 1.5.x #104

Merged
merged 3 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taro-hooks/package.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@tarojs/plugin-framework-react": "<%= version %>",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"taro-hooks": "latest"
"taro-hooks": "^1.5.10"
},
"devDependencies": {
"@babel/core": "^7.8.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ const config = {
framework: "<%= framework %>",
compiler: {
type: '<%= compiler %>',
prebundle: {
enable: false
}
},<% if (compiler === 'webpack5') {%>
cache: {
enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@
"@tarojs/runtime": "<%= version %>",
"@tarojs/shared": "<%= version %>",
"@tarojs/taro": "<%= version %>",
"taro-hooks": "2.0.0-beta-serro.5",
"@taro-hooks/shared": "2.0.0-beta-serro.5",<% if (['react', 'preact'].includes(framework)) {%>
"taro-hooks": "2",
"@taro-hooks/shared": "2",<% if (['react', 'preact'].includes(framework)) {%>
"@tarojs/plugin-framework-react": "<%= version %>",<%}%><% if (['react', 'preact'].includes(framework)) {%>
"@tarojs/react": "<%= version %>",
"@taro-hooks/plugin-react": "2.0.0-beta-serro.5",
"@taro-hooks/plugin-react": "2",
"react-dom": "^18.0.0",
"react": "^18.0.0"<%}%><% if (framework === 'preact') {%>
"preact": "^10.5.15"<%}%><% if (framework === 'vue') {%>
"@tarojs/plugin-framework-vue2": "<%= version %>",
"vue-template-compiler": "^2.5.0",
"vue": "^2.5.0"<%}%><% if (framework === 'vue3') {%>
"@tarojs/plugin-framework-vue3": "<%= version %>",
"@taro-hooks/plugin-vue": "2.0.0-beta-serro.5",
"@taro-hooks/plugin-vue": "2",
"vue": "^3.0.0"<%}%>
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function createWhenTs(params) {
const handler = {
'/tsconfig.json': createWhenTs,
'/types/global.d.ts': createWhenTs,
'/types/vue.d.ts' ({ framework, typescript }) {
'/types/vue.d.ts'({ framework, typescript }) {
return ['vue', 'vue3'].includes(framework) && !!typescript
},
'/src/pages/index/index.jsx'({ pageName }) {
Expand All @@ -32,7 +32,7 @@ const basePageFiles = [


module.exports = {
desc: "使用 taro-hooks canary 版本的模板",
desc: "使用 taro-hooks@2x 版本的模板",
handler,
basePageFiles,
platforms: ["react", "preact", "vue3"],
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/// <reference types="@tarojs/taro" />
<%if (['vue', 'vue3'].includes(framework)) {-%>
/// <reference types="@taro-hooks/plugin-vue" />
import '@taro-hooks/plugin-vue';
<%}-%>
<%if (['react', 'preact', 'nerv'].includes(framework)) {-%>
/// <reference types="@taro-hooks/plugin-react" />
import '@taro-hooks/plugin-react';
<%}-%>

declare module '*.png';
Expand Down
File renamed without changes.