Skip to content

Commit 92faf70

Browse files
committed
feat: init project
0 parents  commit 92faf70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+7496
-0
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
indent_size = 2
5+
end_of_line = lf
6+
insert_final_newline = true

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
4+
pnpm-lock.yaml

.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
2+
const { defineConfig } = require('eslint-define-config')
3+
4+
module.exports = defineConfig({
5+
extends: ['@sxzz/eslint-config-ts', '@sxzz/eslint-config-prettier'],
6+
})

.github/renovate.json5

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
extends: ['config:base', 'schedule:weekly', 'group:allNonMajor'],
3+
labels: ['dependencies'],
4+
pin: false,
5+
rangeStrategy: 'bump',
6+
node: false,
7+
packageRules: [
8+
{
9+
depTypeList: ['peerDependencies'],
10+
enabled: false,
11+
},
12+
],
13+
ignoreDeps: ['node'],
14+
}

.github/workflows/deploy-docs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 16
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: latest
24+
25+
- name: Cache ~/.pnpm-store
26+
uses: actions/cache@v2
27+
env:
28+
cache-name: cache-pnpm-store
29+
with:
30+
path: ~/.pnpm-store
31+
key: ${{ runner.os }}-docs-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
32+
restore-keys: |
33+
${{ runner.os }}-docs-${{ env.cache-name }}-
34+
${{ runner.os }}-docs-
35+
${{ runner.os }}-
36+
37+
- name: Install Dependencies
38+
run: pnpm install
39+
40+
- name: Build
41+
run: pnpm run docs:build
42+
43+
- name: Deploy
44+
run: npx surge --project ./docs --domain jike-sdk.surge.sh --token $SURGE_TOKEN
45+
env:
46+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v**'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: '16'
19+
registry-url: https://registry.npmjs.org/
20+
21+
- run: npx conventional-github-releaser -p angular
22+
env:
23+
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/unit-test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Unit Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
unit_test:
12+
name: Unit Test (Node ${{ matrix.node-version }})
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
node-version: ['14', '16']
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup node
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
30+
- name: Cache ~/.pnpm-store
31+
uses: actions/cache@v2
32+
env:
33+
cache-name: cache-pnpm-store
34+
with:
35+
path: ~/.pnpm-store
36+
key: ${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
37+
restore-keys: |
38+
${{ runner.os }}-${{ matrix.node-version }}-test-${{ env.cache-name }}-
39+
${{ runner.os }}-${{ matrix.node-version }}-test-
40+
${{ runner.os }}-
41+
42+
- name: Setup pnpm
43+
uses: pnpm/action-setup@v2
44+
with:
45+
version: latest
46+
47+
- name: Install dependencies
48+
run: pnpm i --frozen-lockfile
49+
- name: Lint
50+
run: pnpm lint
51+
- name: Build
52+
run: pnpm build
53+
- name: Test
54+
run: pnpm test run tests/request.test.ts

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
docs
4+
.DS_Store
5+
.pnpm-debug.log*

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
4+
pnpm-lock.yaml

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true
4+
}

0 commit comments

Comments
 (0)