Skip to content

Commit

Permalink
[add] VS Code & GitPod.io extensions
Browse files Browse the repository at this point in the history
[optimize] upgrade to Husky 9 & other latest Upstream packages
  • Loading branch information
TechQuery committed Mar 21, 2024
1 parent 0ab7e17 commit 8a5ecfc
Show file tree
Hide file tree
Showing 10 changed files with 2,717 additions and 2,641 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"extends": ["taro/react"],
"plugins": ["simple-import-sort"],
"rules": {
"@typescript-eslint/no-shadow": "off",
"import/first": "off",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/no-shadow": "off",
"react/sort-comp": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
run: pnpm build h5
env:
NODE_ENV: production
- name: Deploy HTML 5 version

- name: Deploy HTML 5 version to GitHub pages
if: ${{ !env.WMA_ID }}
uses: peaceiris/actions-gh-pages@v3
with:
Expand All @@ -45,8 +46,8 @@ jobs:
uses: amondnet/vercel-action@v25
if: ${{ env.VERCEL_TOKEN && env.VERCEL_ORG_ID && env.VERCEL_PROJECT_ID }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./
Expand All @@ -57,16 +58,19 @@ jobs:
run: pnpm build weapp
env:
NODE_ENV: production

- name: Get NPM version
if: ${{ env.WMA_ID }}
uses: martinbeentjes/npm-get-version-action@master
id: package-version

- name: Upload Artifact
if: ${{ env.WMA_ID }}
uses: actions/upload-artifact@v3
with:
name: Taro-miniapp-${{ steps.package-version.outputs.current-version }}-bundle
path: ./dist/

- name: Upload to WeChat
if: ${{ env.WMA_ID }}
run: |
Expand Down
29 changes: 29 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

vscode:
extensions:
- yzhang.markdown-all-in-one
- unifiedjs.vscode-mdx
- xyc.vscode-mdx-preview
- jock.svg
- redhat.vscode-yaml
- clinyong.vscode-css-modules
- akamud.vscode-caniuse
- visualstudioexptteam.intellicode-api-usage-examples
- pflannery.vscode-versionlens
- christian-kohler.npm-intellisense
- esbenp.prettier-vscode
- rangav.vscode-thunder-client
- eamodio.gitlens
- github.vscode-pull-request-github
- github.vscode-github-actions
tasks:
- before: |
pnpm i vercel -g
vercel login --github --oob
init: pnpm i
command: pnpm dev
4 changes: 0 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh

. "$(dirname "$0")/_/husky.sh"

npm test
4 changes: 0 additions & 4 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh

. "$(dirname "$0")/_/husky.sh"

npm run prepublishOnly
19 changes: 19 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"recommendations": [
"yzhang.markdown-all-in-one",
"unifiedjs.vscode-mdx",
"xyc.vscode-mdx-preview",
"jock.svg",
"redhat.vscode-yaml",
"clinyong.vscode-css-modules",
"akamud.vscode-caniuse",
"visualstudioexptteam.intellicode-api-usage-examples",
"pflannery.vscode-versionlens",
"christian-kohler.npm-intellisense",
"esbenp.prettier-vscode",
"rangav.vscode-thunder-client",
"eamodio.gitlens",
"github.vscode-pull-request-github",
"github.vscode-github-actions"
]
}
13 changes: 9 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ https://ideamall.github.io/mini-app/

```shell
npm i pnpm -g
npm set strict-peer-dependencies=false

pnpm i
```

### Start Dev-server

```shell
pnpm dev h5
# pnpm dev weapp
# or
pnpm dev weapp
```

### Mini-app Debug
Expand All @@ -63,7 +67,8 @@ brew install --cask wechatwebdevtools

```shell
pnpm build h5
# pnpm build weapp
# or
pnpm build weapp
```

[1]: https://taro-docs.jd.com/
Expand Down
3 changes: 3 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const config = {
},
miniCssExtractPluginOption: {
ignoreOrder: true
},
optimizeMainPackage: {
enable: true
}
},
h5: {
Expand Down
86 changes: 43 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"css": "less"
},
"scripts": {
"prepare": "husky install",
"prepare": "husky",
"build": "taro build --type",
"dev": "taro build --watch --type",
"test": "lint-staged",
Expand All @@ -21,67 +21,67 @@
"ios >= 8"
],
"dependencies": {
"@antmjs/vantui": "^3.2.2",
"@authing/miniapp-taro": "^5.1.9",
"@babel/runtime": "^7.23.4",
"@antmjs/vantui": "^3.3.5",
"@authing/miniapp-taro": "^5.1.18",
"@babel/runtime": "^7.24.1",
"@ideamall/data-service": "1.0.0-alpha.1",
"@tarojs/components": "3.6.20",
"@tarojs/helper": "3.6.20",
"@tarojs/plugin-framework-react": "3.6.20",
"@tarojs/plugin-html": "3.6.20",
"@tarojs/plugin-http": "3.6.20",
"@tarojs/plugin-platform-alipay": "3.6.20",
"@tarojs/plugin-platform-h5": "3.6.20",
"@tarojs/plugin-platform-jd": "3.6.20",
"@tarojs/plugin-platform-qq": "3.6.20",
"@tarojs/plugin-platform-swan": "3.6.20",
"@tarojs/plugin-platform-tt": "3.6.20",
"@tarojs/plugin-platform-weapp": "3.6.20",
"@tarojs/runtime": "3.6.20",
"@tarojs/shared": "3.6.20",
"@tarojs/taro": "3.6.20",
"@tarojs/components": "3.6.25",
"@tarojs/helper": "3.6.25",
"@tarojs/plugin-framework-react": "3.6.25",
"@tarojs/plugin-html": "3.6.25",
"@tarojs/plugin-http": "3.6.25",
"@tarojs/plugin-platform-alipay": "3.6.25",
"@tarojs/plugin-platform-h5": "3.6.25",
"@tarojs/plugin-platform-jd": "3.6.25",
"@tarojs/plugin-platform-qq": "3.6.25",
"@tarojs/plugin-platform-swan": "3.6.25",
"@tarojs/plugin-platform-tt": "3.6.25",
"@tarojs/plugin-platform-weapp": "3.6.25",
"@tarojs/runtime": "3.6.25",
"@tarojs/shared": "3.6.25",
"@tarojs/taro": "3.6.25",
"@vant/area-data": "^1.5.1",
"@vant/icons": "^3.0.2",
"bootstrap": "^5.3.2",
"classnames": "^2.3.2",
"bootstrap": "^5.3.3",
"classnames": "^2.5.1",
"koajax": "^0.9.6",
"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.19.2",
"query-string": "^8.1.0",
"web-utility": "^4.1.3"
"preact": "^10.20.0",
"query-string": "^9.0.0",
"web-utility": "^4.3.0"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@octokit/openapi-types": "^19.0.2",
"@babel/core": "^7.24.3",
"@octokit/openapi-types": "^20.0.0",
"@prefresh/babel-plugin": "^0.5.1",
"@prefresh/core": "^1.5.2",
"@prefresh/webpack": "~4.0.0",
"@tarojs/cli": "3.6.20",
"@tarojs/webpack5-runner": "3.6.20",
"@tarojs/cli": "3.6.25",
"@tarojs/webpack5-runner": "3.6.25",
"@types/lodash.debounce": "^4.0.9",
"@types/react": "^18.2.38",
"@types/react": "^18.2.67",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"babel-plugin-import": "^1.13.8",
"babel-preset-taro": "3.6.20",
"babel-preset-taro": "3.6.25",
"cross-env": "^7.0.3",
"eslint": "^8.54.0",
"eslint-config-taro": "3.6.20",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-react": "^7.33.2",
"eslint": "^8.57.0",
"eslint-config-taro": "3.6.25",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"stylelint": "^15.11.0",
"typescript": "~5.3.2",
"webpack": "~5.89.0"
"eslint-plugin-simple-import-sort": "^12.0.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"stylelint": "^16.2.1",
"typescript": "~5.4.3",
"webpack": "~5.91.0"
},
"prettier": {
"trailingComma": "none",
Expand Down
Loading

0 comments on commit 8a5ecfc

Please sign in to comment.