Skip to content

Commit 7d58226

Browse files
committed
chore: init
0 parents  commit 7d58226

Some content is hidden

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

46 files changed

+25020
-0
lines changed

.commitlintrc.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-angular'],
3+
rules: {
4+
'type-enum': [
5+
2,
6+
'always',
7+
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test', 'wip'],
8+
],
9+
},
10+
};

.editorconfig

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
indent_style = space
13+
indent_size = 2
14+
15+
[Makefile]
16+
indent_style = tab
17+
indent_size = 1
18+
19+
[*.md]
20+
trim_trailing_whitespace = false

.eslintrc

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:@typescript-eslint/eslint-recommended",
6+
"prettier"
7+
],
8+
"parser": "@typescript-eslint/parser",
9+
"plugins": ["prettier", "@typescript-eslint"],
10+
"parserOptions": {
11+
"ecmaVersion": 6,
12+
"sourceType": "module",
13+
"impliedStrict": true
14+
},
15+
"rules": {
16+
"no-sparse-arrays": 0,
17+
"no-self-assign": 0,
18+
"no-unused-vars": 0, // @typescript-eslint/no-unused-vars
19+
"no-inner-declarations": 0,
20+
"prettier/prettier": 2,
21+
"@typescript-eslint/no-unused-vars": 1,
22+
"@typescript-eslint/no-non-null-assertion": 0,
23+
"@typescript-eslint/no-explicit-any": 0,
24+
"@typescript-eslint/no-use-before-define": [2, { "functions": false }],
25+
"@typescript-eslint/ban-ts-ignore": 0,
26+
"@typescript-eslint/interface-name-prefix": 0,
27+
"@typescript-eslint/no-empty-interface": 0,
28+
"@typescript-eslint/camelcase": 0,
29+
"@typescript-eslint/no-inferrable-types": 0,
30+
"@typescript-eslint/explicit-function-return-type": 0,
31+
"@typescript-eslint/type-annotation-spacing": 0,
32+
"@typescript-eslint/no-empty-function": 1
33+
}
34+
}

.github/workflows/auto-merge.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: automerge
2+
on:
3+
pull_request:
4+
types:
5+
- labeled
6+
- unlabeled
7+
- synchronize
8+
- opened
9+
- edited
10+
- ready_for_review
11+
- reopened
12+
- unlocked
13+
pull_request_review:
14+
types:
15+
- submitted
16+
status: {}
17+
jobs:
18+
automerge:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: automerge
22+
uses: 'pascalgn/automerge-action@a4b03eff945989d41c623c2784d6602560b91e5b'
23+
env:
24+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
25+
MERGE_LABELS: 'automerge,!wip,!WIP,!work in progress'
26+
MERGE_RETRIES: '6'
27+
MERGE_RETRY_SLEEP: '60000'

.github/workflows/ci.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: macOS-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- name: Use Node.js 12
11+
uses: actions/setup-node@v1
12+
with:
13+
node-version: 12.x
14+
- name: npm install
15+
run: |
16+
npm install
17+
- name: lint
18+
run: |
19+
npm run lint
20+
build:
21+
runs-on: macOS-latest
22+
steps:
23+
- uses: actions/checkout@v1
24+
- name: Use Node.js 12
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: 12.x
28+
- name: npm install
29+
run: |
30+
npm install
31+
- name: build
32+
run: |
33+
npm run build
34+
test:
35+
runs-on: macOS-latest
36+
steps:
37+
- uses: actions/checkout@v1
38+
- name: Use Node.js 12
39+
uses: actions/setup-node@v1
40+
with:
41+
node-version: 12.x
42+
- name: npm install
43+
run: |
44+
npm install
45+
- name: test
46+
run: |
47+
npm test -- --coverage
48+
env:
49+
CI: true
50+
- name: Coveralls
51+
uses: coverallsapp/github-action@master
52+
with:
53+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/mirror.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 🤖 Sync to Gitee Mirror
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: 🔁 Sync to Gitee
10+
uses: wearerequired/git-mirror-action@master
11+
env:
12+
# 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY
13+
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
14+
with:
15+
# 注意替换为你的 GitHub 源仓库地址
16+
source-repo: '[email protected]:antvis/G2Plot.git'
17+
# 注意替换为你的 Gitee 目标仓库地址
18+
destination-repo: '[email protected]:antv-g2plot/antv-g2plot.git'
19+
20+
- name: ✅ Build Gitee Pages
21+
uses: yanglbme/gitee-pages-action@master
22+
with:
23+
# 注意替换为你的 Gitee 用户名
24+
gitee-username: afc163
25+
# 注意在 Settings->Secrets 配置 GITEE_PASSWORD
26+
gitee-password: ${{ secrets.GITEE_PASSWORD }}
27+
# 注意替换为你的 Gitee 仓库
28+
gitee-repo: antv-g2plot/antv-g2plot

.github/workflows/rebase.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: Automatic Rebase
5+
jobs:
6+
rebase:
7+
name: Rebase
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: Automatic Rebase
12+
uses: cirrus-actions/rebase@master
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created, edited]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest # change to macOS-latest if need to run ci/test
10+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 12
15+
- run: npm install
16+
- run: npm run lint
17+
18+
publish-site:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v1
23+
- uses: actions/setup-node@v1
24+
with:
25+
node-version: 12
26+
- run: npm install
27+
- run: npm run site:build
28+
- run: |
29+
cd public
30+
git init
31+
git config --local user.name antv
32+
git config --local user.email [email protected]
33+
git add .
34+
git commit -m "update by release action"
35+
- uses: ad-m/github-push-action@master
36+
with:
37+
github_token: ${{secrets.PERSONAL_ACCESS_TOKEN}}
38+
directory: public
39+
branch: gh-pages
40+
force: true
41+
42+
publish-npm:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v1
47+
- uses: actions/setup-node@v1
48+
with:
49+
node-version: 12
50+
registry-url: https://registry.npmjs.org/
51+
- run: npm install
52+
- run: npm run build
53+
- run: npm publish
54+
env:
55+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# lock
9+
package-lock.json
10+
11+
# Runtime data
12+
pids
13+
*.pid
14+
*.seed
15+
*.pid.lock
16+
17+
# Directory for instrumented libs generated by jscoverage/JSCover
18+
lib-cov
19+
20+
# Coverage directory used by tools like istanbul
21+
coverage
22+
23+
# nyc test coverage
24+
.nyc_output
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# Bower dependency directory (https://bower.io/)
30+
bower_components
31+
32+
# node-waf configuration
33+
.lock-wscript
34+
35+
# Compiled binary addons (http://nodejs.org/api/addons.html)
36+
build/Release
37+
38+
# Dependency directories
39+
node_modules/
40+
jspm_packages/
41+
42+
yarn.lock
43+
44+
# Typescript v1 declaration files
45+
typings/
46+
47+
# Optional npm cache directory
48+
.npm
49+
50+
# Optional eslint cache
51+
.eslintcache
52+
53+
# Optional REPL history
54+
.node_repl_history
55+
56+
# Output of 'npm pack'
57+
*.tgz
58+
59+
# Yarn Integrity file
60+
.yarn-integrity
61+
62+
# dotenv environment variables file
63+
.env
64+
65+
public
66+
build
67+
dist
68+
temp
69+
.DS_Store
70+
.idea
71+
.cache
72+
demos/assets/screenshots
73+
/lib
74+
/esm
75+
/dist
76+
77+
*.sw*
78+
*.un~
79+
80+
.vscode
81+
/stats.json

.prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
stats.json
2+
.cache
3+
dist
4+
public
5+
demos/assets

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"bracketSpacing": true,
6+
"printWidth": 120,
7+
"arrowParens": "always"
8+
}

0 commit comments

Comments
 (0)