Skip to content

Commit 97c4cda

Browse files
committed
feat: example
1 parent 00b2025 commit 97c4cda

29 files changed

+760
-3
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ module.exports = {
1111
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
1212
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
1313
"vue/multi-word-component-names": "off",
14-
"@typescript-eslint/no-unused-vars": [
15-
"off"
16-
],
14+
"@typescript-eslint/no-unused-vars": "off",
1715
"vue/no-v-html": "off"
1816
}
1917
}

example/.commitlintrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"type-enum": [
5+
2,
6+
"always",
7+
[
8+
"build",
9+
"chore",
10+
"ci",
11+
"docs",
12+
"feat",
13+
"fix",
14+
"perf",
15+
"refactor",
16+
"revert",
17+
"style",
18+
"test"
19+
]
20+
]
21+
}
22+
}

example/.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Common
2+
node_modules
3+
dist
4+
.github
5+
.vscode
6+
public
7+
coverage

example/.github/workflows/app.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI APP
2+
3+
on:
4+
push:
5+
branches:
6+
- app
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
concurrency:
16+
group: "app"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: app
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: lts/*
31+
32+
- uses: pnpm/action-setup@v2
33+
name: Install pnpm
34+
with:
35+
version: 8
36+
run_install: false
37+
38+
- name: Get pnpm store directory
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42+
43+
- uses: actions/cache@v3
44+
name: Setup pnpm cache
45+
with:
46+
path: ${{ env.STORE_PATH }}
47+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+
restore-keys: |
49+
${{ runner.os }}-pnpm-store-
50+
51+
- name: Install dependencies
52+
run: pnpm install --no-frozen-lockfile
53+
54+
- name: ESLint
55+
run: pnpm lint:eslint
56+
57+
- name: StyleLint
58+
run: pnpm lint:stylelint
59+
60+
- name: Build
61+
run: pnpm build
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- gh-pages
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
ref: gh-pages
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: lts/*
32+
33+
- uses: pnpm/action-setup@v2
34+
name: Install pnpm
35+
with:
36+
version: 8
37+
run_install: false
38+
39+
- name: Get pnpm store directory
40+
shell: bash
41+
run: |
42+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
43+
44+
- uses: actions/cache@v3
45+
name: Setup pnpm cache
46+
with:
47+
path: ${{ env.STORE_PATH }}
48+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49+
restore-keys: |
50+
${{ runner.os }}-pnpm-store-
51+
52+
- name: Install dependencies
53+
run: pnpm install --no-frozen-lockfile
54+
55+
- name: ESLint
56+
run: pnpm lint:eslint
57+
58+
- name: StyleLint
59+
run: pnpm lint:stylelint
60+
61+
- name: Build
62+
run: pnpm build && touch dist/.nojekyll
63+
64+
- name: Upload artifact
65+
uses: actions/upload-pages-artifact@v2
66+
with:
67+
path: dist
68+
69+
deploy:
70+
environment:
71+
name: github-pages
72+
url: ${{ steps.deployment.outputs.page_url }}
73+
runs-on: ubuntu-latest
74+
needs: build
75+
steps:
76+
- name: Deploy to GitHub Pages
77+
id: deployment
78+
uses: actions/deploy-pages@v2

example/.github/workflows/lib.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI LIB
2+
3+
on:
4+
push:
5+
branches:
6+
- lib
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
concurrency:
16+
group: "lib"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: lib
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: lts/*
31+
32+
- uses: pnpm/action-setup@v2
33+
name: Install pnpm
34+
with:
35+
version: 8
36+
run_install: false
37+
38+
- name: Get pnpm store directory
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42+
43+
- uses: actions/cache@v3
44+
name: Setup pnpm cache
45+
with:
46+
path: ${{ env.STORE_PATH }}
47+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+
restore-keys: |
49+
${{ runner.os }}-pnpm-store-
50+
51+
- name: Install dependencies
52+
run: pnpm install --no-frozen-lockfile
53+
54+
- name: ESLint
55+
run: pnpm lint:eslint
56+
57+
- name: StyleLint
58+
run: pnpm lint:stylelint
59+
60+
- name: Build
61+
run: pnpm build

example/.github/workflows/main.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI Main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
concurrency:
16+
group: "main"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: main
26+
27+
- name: Setup Node
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: lts/*
31+
32+
- uses: pnpm/action-setup@v2
33+
name: Install pnpm
34+
with:
35+
version: 8
36+
run_install: false
37+
38+
- name: Get pnpm store directory
39+
shell: bash
40+
run: |
41+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42+
43+
- uses: actions/cache@v3
44+
name: Setup pnpm cache
45+
with:
46+
path: ${{ env.STORE_PATH }}
47+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48+
restore-keys: |
49+
${{ runner.os }}-pnpm-store-
50+
51+
- name: Install dependencies
52+
run: pnpm install --no-frozen-lockfile
53+
54+
- name: ESLint
55+
run: pnpm lint:eslint
56+
57+
- name: StyleLint
58+
run: pnpm lint:stylelint
59+
60+
- name: Build
61+
run: pnpm build

example/.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
# other
27+
.stylelintcache

example/.stylelintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Common
2+
node_modules
3+
dist
4+
.github
5+
.nuxt
6+
.output
7+
public
8+
coverage

example/.stylelintrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"extends": [
3+
"stylelint-config-standard",
4+
"stylelint-config-html/vue",
5+
"stylelint-config-recommended-vue/scss",
6+
"stylelint-config-recommended-less",
7+
"stylelint-config-recommended-scss"
8+
],
9+
"plugins": ["stylelint-order"],
10+
"overrides": [
11+
{
12+
"files": ["**/*.vue"],
13+
"customSyntax": "postcss-html"
14+
}
15+
],
16+
"rules": {
17+
"selector-class-pattern": null,
18+
"selector-id-pattern": null,
19+
"selector-pseudo-class-no-unknown": null,
20+
"no-descending-specificity": null,
21+
"import-notation": null,
22+
"scss/at-import-partial-extension": null,
23+
"property-no-unknown": null
24+
25+
}
26+
}

0 commit comments

Comments
 (0)