Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 19 additions & 13 deletions .github/actions/install-dep/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,27 @@ on:
default: '14'

runs:
using: "composite"
steps:
- uses: actions/setup-node@v2
using: 'composite'
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.nodeVersion }}
- name: Get npm cache directory
id: npm-cache-dir

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
shell: bash
${{ runner.os }}-pnpm-store-

- run: pnpm install
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
node-version: 18

- run: npm install
- uses: ./.github/actions/install-dep

- run: npm run build

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-comment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install
- uses: ./.github/actions/install-dep
- run: npm run test:snap-update
- name: Commit Snapshot
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ jobs:
- uses: preactjs/compressed-size-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
install-script: 'npm install'
install-script: 'npm install --force'
pattern: './miniprogram_dist/**/*.{js,wxs,wxml,json}'
2 changes: 1 addition & 1 deletion .github/workflows/typos-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ nd = "nd"
loosing = "loosing"

[files]
extend-exclude = ["CHANGELOG*.md"]
extend-exclude = ["CHANGELOG*.md", "changelog.json"]
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*
tdesign-miniprogram
/tdesign-miniprogram
m2w_dist
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "src/_common"]
path = src/_common
[submodule "packages/common"]
path = packages/common
url = https://github.com/Tencent/tdesign-common.git
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
**/*.md
src/_common
packages/common
10 changes: 0 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
{
"explorer.fileNesting.expand": false,
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
".gitignore": ".git*",
".prettierrc.yml": ".prettier*, .eslint*, .editorconfig",
"README.md": "*.md, LICENSE",
"tsconfig.json": "tsconfig.*.json, *.d.ts",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, .npm*",
"babel.config.js": "*.config.js"
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.tslint": "explicit",
Expand Down
4 changes: 2 additions & 2 deletions example/app.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../src/common/style/_variables.less';
@import '../src/common/style/theme/_index.less';
@import '../packages/components/common/style/_variables.less';
@import '../packages/components/common/style/theme/_index.less';

@font-face {
font-family: 'TCloudNumber';
Expand Down
2 changes: 1 addition & 1 deletion example/components/demo-block/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../src/common/style/index.less';
@import '../../../packages/components/common/style/index.less';

.demo-block {
margin: @spacer-4 0 0;
Expand Down
2 changes: 1 addition & 1 deletion example/pages/home/home.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../../src/common/style/_variables.less';
@import '../../../packages/components/common/style/_variables.less';

.main {
width: 100%;
Expand Down
51 changes: 18 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "tdesign-miniprogram",
"packageManager": "[email protected]",
"purename": "tdesign",
"version": "1.10.1",
"description": "tdesign-miniprogram",
Expand All @@ -24,19 +25,19 @@
"build:assets": "cross-env NODE_ENV=production gulp assets:build --gulpfile script/gulpfile.dist.js --cwd ./",
"update:icons": "node script/update-icons.js",
"update:css": "node script/generate-css-vars.js",
"lintfix": "eslint '{src,example}/**/*.{js,ts}' --fix",
"lint": "eslint '{src,example}/**/*.{js,ts}'",
"format": "prettier {src,example,script}/**/*.{js,ts,wxss,less,wxml,html,json,md,wxs} --write",
"site": "cd site && vite build --configLoader runner",
"site:dev": "cd site && vite --configLoader runner",
"site:intranet": "cd site && vite build --mode intranet --configLoader runner",
"site:prerender": "node script/prerender.mjs",
"cover": "jest --coverage",
"test": "jest && jest -c jest.e2e.config.js",
"test:snap-update": "npm run test:unit -- -u",
"test:demo": "node script/gen-demo-test.js",
"test:unit": "jest",
"test:e2e": "jest -c jest.e2e.config.js",
"lintfix": "eslint '{packages,example}/**/*.{js,ts}' --fix",
"lint": "eslint '{packages,example}/**/*.{js,ts}'",
"format": "prettier {packages,example,script}/**/*.{js,ts,wxss,less,wxml,html,json,md,wxs} --write",
"site": "pnpm -C packages/tdesign-miniprogram-site site",
"site:dev": "pnpm -C packages/tdesign-miniprogram-site site:dev",
"site:intranet": "pnpm -C packages/tdesign-miniprogram-site site:intranet",
"site:prerender": "pnpm -C packages/tdesign-miniprogram-site site:prerender",
"cover": "pnpm -C test cover",
"test": "pnpm -C test test",
"test:snap-update": "pnpm -C test test:snap-update",
"test:demo": "pnpm -C test test:demo",
"test:unit": "pnpm -C test test:unit",
"test:e2e": "pnpm -C test test:e2e",
"badge": "node script/coverage-badge.js",
"prepare": "husky install",
"generate": "gulp generate --gulpfile script/gulpfile.js --cwd ./",
Expand All @@ -54,28 +55,21 @@
"@babel/preset-typescript": "^7.12.7",
"@commitlint/cli": "^16.0.2",
"@commitlint/config-conventional": "^16.0.0",
"@rollup/plugin-node-resolve": "^13.0.5",
"@types/jest": "^27.0.3",
"@types/node": "^20.14.11",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "~5.35.0",
"@vitejs/plugin-vue": "^5.2.4",
"@vitejs/plugin-vue-jsx": "^4.2.0",
"@vue/compiler-sfc": "^3.2.4",
"axios": "^1.1.3",
"babel-jest": "^26.6.3",
"commitizen": "^4.2.4",
"cross-env": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
"dayjs": "^1.10.7",
"del": "^6.1.1",
"eslint": "^7.0.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-prettier": "^4.0.0",
"glob": "^8.1.0",
"gray-matter": "^4.0.3",
"gulp": "^4.0.2",
"gulp-changed": "^4.0.2",
"gulp-clean-css": "^4.3.0",
Expand All @@ -93,9 +87,6 @@
"gulp-terser": "^2.1.0",
"gulp-typescript": "^6.0.0-alpha.1",
"husky": "^7.0.4",
"jest": "^26.6.3",
"jest-html-reporter": "^3.3.0",
"jsdom": "^20.0.0",
"less": "^4.1.1",
"lint-staged": "^10.0.0-1",
"lodash": "^4.17.21",
Expand All @@ -106,32 +97,26 @@
"npm-run-all": "^4.1.5",
"playwright": "^1.19.1",
"prettier": "^2.0.5",
"prismjs": "^1.24.1",
"standard-changelog": "^2.0.27",
"stylelint": "^13.13.1",
"tdesign-icons-view": "^0.3.7",
"tdesign-publish-cli": "^0.0.12",
"@tdesign/site-components": "^0.17.0",
"tdesign-theme-generator": "^1.1.0",
"tinycolor2": "^1.4.2",
"tslib": "^2.8.1",
"typescript": "~4.7.2",
"vite": "^6.2.3",
"vite-plugin-tdoc": "^2.0.1",
"vue": "^3.2.4",
"vue-router": "^4.0.11"
"typescript": "~4.7.2"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"lint-staged": {
"{src,example,script}/**/*.{js,ts,wxs,wxml,wxss,html,json,less}": [
"{packages/components,example,script}/**/*.{js,ts,wxs,wxml,wxss,html,json,less}": [
"prettier --write"
],
"{src,example}/**/*.{js,ts}": [
"{packages/components,example}/**/*.{js,ts}": [
"eslint --fix"
]
}
}
}
1 change: 1 addition & 0 deletions packages/common
Submodule common added at 23ecc6
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ spline: data
isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-89%25-blue" /></span>

<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
Expand All @@ -14,6 +13,7 @@ isComponent: true
该组件于 0.9.0 版本上线,请留意版本。
</div>

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-98%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-87%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-98%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-93%25-blue" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
File renamed without changes.
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 @@ spline: data
isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-99%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-85%25-blue" /></span>
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-62%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-71%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-62%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-84%25-blue" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
File renamed without changes.
File renamed without changes.
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 @@ spline: navigation
isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-100%25-blue" /></span>
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-61%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-57%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-61%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-67%25-red" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
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 @@ spline: data
isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-100%25-blue" /></span>
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-52%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-50%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-52%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-50%25-red" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import simulate from 'miniprogram-simulate';
import { hex2Rgb } from '../../../test/utils/colors';
import { hex2Rgb } from '../../../../test/utils/colors';

const shapes = ['circle', 'square', 'round', 'ribbon'];

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ spline: base
isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-83%25-blue" /></span>
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-51%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-88%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-51%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-74%25-red" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
File renamed without changes.
File renamed without changes.
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 @@ -4,7 +4,6 @@ description: 按照日历形式展示数据或日期的容器。
spline: form
isComponent: true
---
<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-100%25-blue" /></span>

<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
Expand All @@ -13,6 +12,7 @@ isComponent: true
该组件于 0.22.0 版本上线,请留意版本。
</div>

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-56%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-47%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-56%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-70%25-red" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
File renamed without changes.
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 @@ -12,6 +12,7 @@ isComponent: true
该组件于 0.23.0 版本上线,请留意版本。
</div>

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-34%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-5%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-34%25-red" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-50%25-red" /></span>
## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down
Loading
Loading