Skip to content

Commit 9cfa094

Browse files
committed
feat: v0.1.0
1 parent f249b0c commit 9cfa094

20 files changed

+5157
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# .eslintignore
2+
3+
node_modules
4+
dist
5+

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
extends: ['plugin:prettier/recommended'],
3+
plugins: ['prettier'],
4+
parser: '@typescript-eslint/parser',
5+
rules: {
6+
'prettier/prettier': 'error',
7+
'no-console': 0
8+
}
9+
}

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [surmon-china]
2+
custom: ['https://paypal.me/surmon', 'https://surmon.me/sponsor']

.github/workflows/coverage.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Test Coverage
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '14'
17+
cache: 'yarn'
18+
19+
- name: Install dependencies
20+
run: yarn install
21+
22+
- name: Test
23+
run: yarn test
24+
25+
- name: Upload coverage to Codecov
26+
uses: codecov/codecov-action@v2
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
directory: ./coverage/
30+
verbose: true

.github/workflows/pr-test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: PR Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '14'
17+
cache: 'yarn'
18+
19+
- name: Install dependencies
20+
run: yarn install
21+
22+
- name: Lint/Test/Build
23+
run: yarn rebirth

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
# Fork from: https://github.com/actions/starter-workflows/blob/master/ci/npm-publish.yml
4+
5+
name: Publish
6+
7+
on:
8+
release:
9+
types: [created]
10+
push:
11+
tags:
12+
- 'v*'
13+
14+
jobs:
15+
publish-npm:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: actions/setup-node@v2
20+
with:
21+
node-version: '14'
22+
cache: 'yarn'
23+
registry-url: https://registry.npmjs.org/
24+
- run: yarn install
25+
- run: yarn rebirth
26+
- run: npm publish --access=public
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# https://github.com/actions/create-release
2+
3+
name: Release
4+
5+
on:
6+
push:
7+
tags:
8+
- 'v*'
9+
10+
jobs:
11+
build:
12+
name: Create Release
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@master
18+
19+
- name: Create Release
20+
id: create_release
21+
uses: actions/create-release@latest
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
tag_name: ${{ github.ref }}
26+
release_name: ${{ github.ref }}
27+
# body:
28+
draft: false
29+
prerelease: false

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"tabWidth": 2,
3+
"semi": false,
4+
"singleQuote": true,
5+
"printWidth": 90,
6+
"trailingComma": "none",
7+
"endOfLine": "auto",
8+
"vueIndentScriptAndStyle": true
9+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"editor.detectIndentation": false,
4+
"editor.formatOnSave": true,
5+
"editor.formatOnType": true,
6+
"editor.codeActionsOnSave": {
7+
"source.fixAll": true
8+
},
9+
"typescript.tsdk": "node_modules/typescript/lib"
10+
}

0 commit comments

Comments
 (0)