Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:opentiny/tiny-vue into exclude-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Davont committed Feb 18, 2025
2 parents 3645bc0 + 216bb90 commit 583cf58
Show file tree
Hide file tree
Showing 5,078 changed files with 38,078 additions and 152,069 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,15 @@
"contributions": [
"code"
]
},
{
"login": "dufu1991",
"name": "dufu1991",
"avatar_url": "https://avatars.githubusercontent.com/u/24769077?v=4",
"profile": "https://github.com/dufu1991",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 8,
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = {
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-invalid-this': 'off',
'vue/no-deprecated-dollar-scopedslots-api': 'off',
'@typescript-eslint/lines-between-class-members': 'off'
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/no-this-alias': 'off'
}
}
35 changes: 19 additions & 16 deletions .github/workflows/auto-all-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
build:
runs-on: windows-latest
outputs:
publishVersion: ${{ steps.parseTag.outputs.publishVersion }}
branchVersion: ${{ steps.parseTag.outputs.branchVersion }}
steps:
- name: Parse Tag
Expand All @@ -18,9 +17,7 @@ jobs:
with:
script: |
const tag = `${{ github.ref_name }}`
const publishVersion = tag.slice(3)
const branchVersion = tag.slice(1)
core.setOutput('publishVersion', publishVersion)
const branchVersion = tag.slice(1).split('.').slice(0, 2).join('.') + '.0'
core.setOutput('branchVersion', branchVersion)
- name: CheckOut Code
Expand All @@ -36,42 +33,48 @@ jobs:
with:
node-version: 20.10.0
registry-url: 'https://registry.npmjs.org'

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --no-frozen-lockfile

- name: Run Build Components
run: pnpm build:ui -t ${{ steps.parseTag.outputs.publishVersion }}
run: pnpm build:ui

- name: Run Build Sass Common
run: pnpm build:ui saas-common -t ${{ steps.parseTag.outputs.publishVersion }} -d saas
run: pnpm build:ui saas-common -d saas

- name: Run Build Theme
run: pnpm build:theme

- name: Run Build Renderless
run: pnpm build:renderless

- name: Run Build ThemeSaas
run: pnpm build:themeSaas

- name: Run Build ThemeMobile
run: pnpm build:themeMobile

- name: Run Build Utils
run: pnpm build:utils

- name: Run Build Hooks
run: pnpm build:hooks

- name: Run Build Runtime
run: pnpm build:runtime

- name: Publish Vue3 And Vue2 components
run: pnpm pub:all
run: pnpm pub:all && pnpm pub:utils && pnpm pub:hooks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
25 changes: 17 additions & 8 deletions .github/workflows/auto-deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -31,27 +33,34 @@ jobs:
with:
version: 9
- name: Install deps
run: pnpm -F @opentiny/vue-docs i --ignore-scripts --no-frozen-lockfile
run: pnpm i --no-frozen-lockfile
- name: Build site
run: pnpm -F @opentiny/vue-docs build
run: export NODE_OPTIONS="--max-old-space-size=8192" && pnpm -F @opentiny/vue-docs build
- name: Setup Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./examples/sites/dist
destination: ./_site
- name: Repair build artifact
run: |
sudo chmod -R 777 ./_site
cp ./examples/sites/dist/assets/_commonjsHelpers*.js ./_site/assets
cp ./_site/index.html ./_site/404.html
sed -i 's/\/static/\/tiny-vue\/static/' ./_site/static/js/design-common.js
sh ./examples/sites/dist/cp-component-md.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
94 changes: 94 additions & 0 deletions .github/workflows/dispatch-all-publish-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Dispatch Alpha All Publish
run-name: Dispatch All Publish Alpha--${{ inputs.version }}

on:
workflow_dispatch:
inputs:
version:
description: |
输入您将要发布的版本号,
例如: `3.xx.xx`.
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
outputs:
publishVersion: ${{ steps.parseVersion.outputs.publishVersion }}
steps:
- name: Parse Version
id: parseVersion
uses: actions/github-script@v6
with:
script: |
const version = `${{ inputs.version }}`
if(!/^\d\.\d+\.\d+/.test(version)) {
throw new Error('版本号格式不正确')
}
const publishVersion = version.slice(2)
core.setOutput('publishVersion', publishVersion)
- name: CheckOut Code
uses: actions/checkout@master
with:
ref: ${{ github.ref_name }}

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.10.0
registry-url: 'https://registry.npmjs.org'

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --no-frozen-lockfile

- name: Run Build Components
run: pnpm build:ui -t ${{ steps.parseVersion.outputs.publishVersion }}

- name: Run Build Sass Common
run: pnpm build:ui saas-common -t ${{ steps.parseVersion.outputs.publishVersion }} -d saas

- name: Run Build Theme
run: pnpm build:theme

- name: Run Build Renderless
run: pnpm build:renderless

- name: Run Build ThemeSaas
run: pnpm build:themeSaas

- name: Run Build Utils
run: pnpm build:utils

- name: Run Build Hooks
run: pnpm build:hooks

- name: Run Build Runtime
run: pnpm build:runtime

- name: Run Release alpha
run: pnpm release:alpha

- name: Publish Vue3 And Vue2 components
run: pnpm pub:all && pnpm pub:utils && pnpm pub:hooks && pnpm pub:site
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}
116 changes: 116 additions & 0 deletions .github/workflows/dispatch-renderless-theme-publish-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Dispatch Alpha Renderless Theme Runtime
run-name: Dispatch Alpha Renderless Theme Runtime--${{ inputs.components }}

on:
workflow_dispatch:
inputs:
components:
description: |
输入需要打包的模块名称,多个以英文逗号分隔,
例如: `theme,renderless,runtime,docs,utils,hooks`
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
steps:
- name: Parse Components
id: parseComponents
uses: actions/github-script@v6
with:
script: |
const branchName = `${{ github.ref_name }}`
const moduleName = `${{ inputs.components }}`
const validModuleNames = ['theme', 'renderless', 'runtime', 'docs','utils','hooks']
if (!validModuleNames.some(name => moduleName.includes(name))) {
throw new Error('请输入正确的包名称')
}
- name: CheckOut Code
uses: actions/checkout@master
with:
ref: ${{ github.ref_name }}

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

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.10.0
registry-url: 'https://registry.npmjs.org'

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --no-frozen-lockfile

- name: Run Build Theme
if: contains(inputs.components, 'theme') == true
run: pnpm build:theme

- name: Run Build Renderless
if: contains(inputs.components, 'renderless') == true
run: pnpm build:renderless

- name: Run Build ThemeSaas
if: contains(inputs.components, 'theme-saas') == true
run: pnpm build:themeSaas

- name: Run Build Runtime
if: contains(inputs.components, 'runtime') == true
run: pnpm build:runtime

- name: Run Build Utils
if: contains(inputs.components, 'utils') == true
run: pnpm build:utils

- name: Run Build Hooks
if: contains(inputs.components, 'hooks') == true
run: pnpm build:hooks

- name: Run Release alpha
run: pnpm release:alpha -u

- name: Publish
run: |
pnpm pub:all
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}

- name: Publish Utils
if: contains(inputs.components, 'utils') == true
run: |
pnpm pub:utils
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}

- name: Publish Hooks
if: contains(inputs.components, 'hooks') == true
run: |
pnpm pub:hooks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}

- name: Publish Docs
if: contains(inputs.components, 'docs') == true
run: |
pnpm pub:site
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_OPENTINY_VUE_TOKEN }}
10 changes: 3 additions & 7 deletions .github/workflows/dispatch-renderless-theme-publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Dispatch Renderless Theme
run-name: Dispatch Renderless Theme--${{ inputs.components }}
name: Dispatch Renderless Theme Runtime
run-name: Dispatch Renderless Theme Runtime--${{ inputs.components }}

on:
workflow_dispatch:
Expand All @@ -26,7 +26,7 @@ jobs:
const branchName = `${{ github.ref_name }}`
const moduleName = `${{ inputs.components }}`
if (!moduleName.includes('theme') && !moduleName.includes('renderless')) {
if (!moduleName.includes('theme') && !moduleName.includes('renderless') && !moduleName.includes('runtime')) {
throw new Error('请输入正确的包名称')
}
Expand Down Expand Up @@ -76,10 +76,6 @@ jobs:
if: contains(inputs.components, 'theme-saas') == true
run: pnpm build:themeSaas

- name: Run Build ThemeMobile
if: contains(inputs.components, 'theme-mobile') == true
run: pnpm build:themeMobile

- name: Run Build Runtime
if: contains(inputs.components, 'runtime') == true
run: pnpm build:runtime
Expand Down
Loading

0 comments on commit 583cf58

Please sign in to comment.