Skip to content

Commit

Permalink
Merge pull request #1 from lzear/next
Browse files Browse the repository at this point in the history
update from remote
  • Loading branch information
lzear authored Apr 5, 2024
2 parents 741e4e5 + 1a7fc23 commit 6510ce0
Show file tree
Hide file tree
Showing 23 changed files with 2,880 additions and 2,104 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eslint.config.js linguist-vendored
8 changes: 8 additions & 0 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Dependencies

runs:
using: composite
steps:
- name: Install dependencies
run: yarn install --frozen-lockfile
shell: bash
9 changes: 9 additions & 0 deletions .github/actions/install-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Install Tools

runs:
using: composite
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20
29 changes: 11 additions & 18 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docs
name: Docs

on:
push:
Expand All @@ -7,30 +7,23 @@ on:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: install node
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Tools
uses: ./.github/actions/install-tools

- name: install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: build
run: pnpm run docs:build
- name: Build Docs
run: yarn run docs:build

- name: deploy to netlify
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs/.vitepress/dist'
Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: Release

on:
push:
Expand All @@ -8,24 +8,19 @@ on:

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: install node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Tools
uses: ./.github/actions/install-tools

- run: pnpx changelogithub
- name: Create GitHub Release
run: pnpx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
62 changes: 43 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Test

on:
push:
Expand All @@ -7,29 +7,53 @@ on:
pull_request:

jobs:
test:
format:
name: Format
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Tools
uses: ./.github/actions/install-tools

- name: install node
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Test
run: yarn run test:format

- name: build
run: pnpm build
js:
name: JS
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: Test
run: yarn run test:js

types:
name: Types
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Tools
uses: ./.github/actions/install-tools

- name: Install Dependencies
uses: ./.github/actions/install-dependencies

- name: test
run: pnpm test
- name: Test
run: yarn run test:types
2 changes: 1 addition & 1 deletion .simple-git-hooks.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"commit-msg": "pnpm exec commitlint -e \"$@\""
"commit-msg": "yarn run commitlint -e \"$@\""
}
53 changes: 29 additions & 24 deletions .vitepress/theme/components/code-samples-align.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,74 +76,77 @@ export default {

<style scoped>
h2 {
display: inline-block;
padding: 4px 12px;
margin: 0 auto 5px;
font-size: 1.3rem;
font-weight: 700;
background: var(--vp-c-default-3);
display: inline-block;
margin: 0 auto 5px;
padding: 4px 12px;
}
.shown {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
inset-block: 0 0;
inset-inline: 0 0;
display: flex;
align-items: center;
justify-content: center;
}
.shidden {
visibility: hidden;
}
.shidden, .shidden .code-example {
padding-right: 4rem;
padding-inline-end: 4rem;
}
.shown .content-left {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 6px;
inset-block: 0 0;
inset-inline-start: 0;
inline-size: 6px;
}
.shown .content-right {
}
.content-left {
opacity: 0.95;
overflow: hidden;
opacity: 95%;
}
.content-right {
left: 0;
inset-inline-start: 0;
}
.slider {
position: absolute;
top: 0;
left: 6px;
height: 100%;
width: 3px;
inset-block-start: 0;
inset-inline-start: 6px;
inline-size: 3px;
block-size: 100%;
background-color: #ffffff33;
}
.code-example {
block-size: 100%;
color: #eee;
background-color: #1c2316;
border-radius: 2px;
color: #eee;
height: 100%;
}
.code-example.bad {
padding: 8px 5px 8px 25px;
border: 1px solid #ccc;
}
.code-example.good {
padding: 20px 0 20px 25px;
border-radius: 18px 0 0 18px;
background-color: #2a2442;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
border-radius: 18px 0 0 18px;
box-shadow: 0 4px 6px rgb(0 0 0 / 10%), 0 1px 3px rgb(0 0 0 / 8%);
}
.bad, .bad code, .bad pre code {
Expand All @@ -168,6 +171,7 @@ h2 {
.hljs-title.class_ {
color: #e06c75;
}
.hljs-comment {
color: #6f818c;
}
Expand All @@ -184,7 +188,7 @@ h2 {
color: #98c379;
}
/*bad*/
/* bad */
.bad .hljs-keyword {
color: #c678dd;
}
Expand All @@ -196,6 +200,7 @@ h2 {
.bad .hljs-title.class_ {
color: #e06c75;
}
.bad .hljs-comment {
color: #6f818c;
}
Expand Down
Loading

0 comments on commit 6510ce0

Please sign in to comment.