Skip to content

Commit

Permalink
[refactor] upgrade to ES Decorator stage-3 & MobX 6
Browse files Browse the repository at this point in the history
[migrate] replace built-in Repository model with MobX-GitHub
[optimize] simplify some Class Component codes
  • Loading branch information
TechQuery committed Oct 27, 2024
1 parent bc79a39 commit 42d901a
Show file tree
Hide file tree
Showing 13 changed files with 200 additions and 206 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-shadow": "off",
"import/first": "off",
"import/no-commonjs": "warn",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ package-lock.json
yarn.lock
.swc/
dist/
.vscode/settings.json
.vercel
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ https://idea2app.github.io/Taro-Vant-MobX-ts/

- Language: [TypeScript v5][2]
- Component engine: [Preact v10][3]
- State management: [MobX v4][4]
- State management: [MobX v6][4]
- Component suite: [AntM Vant UI v3][5] + [Bootstrap v5 (CSS utility)][9]
- CI / CD: GitHub [Actions][10] + [Pages][11]

Expand Down
6 changes: 5 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ module.exports = {
'taro',
{
framework: 'preact',
ts: true
ts: true,
decoratorsBeforeExport: true,
decoratorsLegacy: false
}
]
],
plugins: [
// https://babeljs.io/docs/babel-plugin-proposal-decorators#note-compatibility-with-babelplugin-transform-class-properties
['@babel/plugin-proposal-decorators', { version: '2023-05' }],
[
'import',
{
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,19 @@
"classnames": "^2.5.1",
"koajax": "^3.0.2",
"lodash.debounce": "^4.0.8",
"mobx": "^4.15.7",
"mobx-i18n": "^0.4.2",
"mobx-react": "^6.3.1",
"mobx-restful": "^0.6.12",
"preact": "10.20.2",
"mobx": "^6.13.5",
"mobx-github": "^0.3.4",
"mobx-i18n": "^0.6.0",
"mobx-react": "^9.1.1",
"mobx-restful": "^1.0.1",
"preact": "~10.23.2",
"query-string": "^9.1.1",
"web-utility": "^4.4.1"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.25.9",
"@babel/preset-react": "^7.25.9",
"@octokit/openapi-types": "^22.2.0",
"@prefresh/babel-plugin": "^0.5.1",
Expand Down
Loading

1 comment on commit 42d901a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for taro-vant-mobx-ts ready!

✅ Preview
https://taro-vant-mobx-vev2kbc1x-techquerys-projects.vercel.app

Built with commit 42d901a.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.