-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from kwooshung/develop
Develop
- Loading branch information
Showing
52 changed files
with
8,748 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: "2" | ||
exclude_patterns: | ||
- "scripts/" | ||
- "**/*test.js" | ||
- "**/*test.ts" | ||
- "**/*spec.js" | ||
- "**/*spec.ts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./configs/commitlintrc.cjs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./configs/eslintrc.cjs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: ci | ||
|
||
# 当推送到 main分支 时 触发此工作流 | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@main | ||
|
||
# 全局安装 pnpm | ||
- name: install pnpm | ||
run: npm install -g pnpm | ||
|
||
# 使用 pnpm 安装依赖 | ||
- name: install dependencies | ||
run: pnpm install | ||
|
||
# 使用 pnpm 执行测试 | ||
- name: run tests | ||
run: pnpm test:ci | ||
|
||
# 上传覆盖率报告到 Coveralls | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@main | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# 使用 pnpm 构建 | ||
- name: build | ||
run: pnpm build | ||
|
||
# 自动发布 | ||
- name: Auto Release | ||
run: npx cvlar -r | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# 同步到 Gitee | ||
- name: Sync to Gitee | ||
uses: wearerequired/git-mirror-action@master | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }} | ||
with: | ||
source-repo: 'git@github.com:kwooshung/files.git' | ||
destination-repo: 'git@gitee.com:kwooshung/files.git' | ||
|
||
# 自动发布到 npm | ||
- name: Sync to Npm.js | ||
uses: actions/setup-node@main | ||
with: | ||
node-version: '14.0.0' | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Publish to Npm.js | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
.eslintcache | ||
.stylelintcache | ||
node_modules | ||
dist | ||
dist-ssr | ||
coverage | ||
*.local | ||
# Editor directories and files | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
*.bak | ||
.cvlar-commit-message-*.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./configs/.ks-cvlarrc.cjs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"*.{js,jsx,ts,tsx}": ["npx prettier --write", "npx eslint --fix"], | ||
"*.json": ["npx prettier --write"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module.exports = { | ||
eslintInter: true, | ||
// 一行最多 200 字符 | ||
printWidth: 200, | ||
// 使用 2 个空格缩进 | ||
tabWidth: 2, | ||
// 不使用缩进符,而使用空格 | ||
useTabs: false, | ||
// 行尾分号 | ||
semi: true, | ||
// 使用单引号 | ||
singleQuote: true, | ||
// 对象的 key 仅在必要时用引号 | ||
quoteProps: 'as-needed', | ||
// jsx 使用单引号 | ||
jsxSingleQuote: true, | ||
// 尾随逗号 | ||
trailingComma: 'all', | ||
// 大括号内的首尾需要空格 | ||
bracketSpacing: true, | ||
// jsx 标签的反尖括号需要换行 | ||
jsxBracketSameLine: true, | ||
// 箭头函数,只有一个参数的时候,也需要括号 | ||
arrowParens: 'always', | ||
// 每个文件格式化的范围是文件的全部内容 | ||
rangeStart: 0, | ||
// 需要格式化和检查的代码结束偏移值(从尾部开始) | ||
rangeEnd: Infinity, | ||
// 不需要写文件开头的 @prettier | ||
requirePragma: false, | ||
// 不需要自动在文件开头插入 @prettier | ||
insertPragma: false, | ||
// 使用默认的折行标准 | ||
proseWrap: 'preserve', | ||
// 根据显示样式决定 html 要不要折行 | ||
htmlWhitespaceSensitivity: 'css', | ||
// 去除对象最后一个逗号 | ||
trailingComma: 'none', | ||
// 换行符使用 lf | ||
endOfLine: 'lf' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"jsc": { | ||
"target": "es5", | ||
"parser": { | ||
"syntax": "typescript", | ||
"dynamicImport": false, | ||
"decorators": false | ||
} | ||
} | ||
} |
Oops, something went wrong.