Skip to content

Commit

Permalink
🎉 初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jan 7, 2021
0 parents commit 2ef0ee6
Show file tree
Hide file tree
Showing 33 changed files with 753 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ['cz'],
rules: {},
};
46 changes: 46 additions & 0 deletions .cz-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module.exports = {
types: [
{
value: '🚧 WIP',
name: '🚧 WIP: Work in progress',
},
{
value: '✨ feat',
name: '✨ feat: A new feature',
},
{
value: '🐛 fix',
name: '🐛 fix: A bug fix',
},
{
value: '🚀️ refactor',
name:
'🚀️ refactor: A code change that neither fixes a bug nor adds a feature',
},
{
value: '📚 docs',
name: '📚 docs: Documentation only changes',
},
{
value: '✅ test',
name: '✅ test: Add missing tests or correcting existing tests',
},
{
value: '🔧 chore',
name:
"🔧 chore: Changes that don't modify src or test files. Such as updating build tasks, package manager",
},
{
value: '💅 style',
name:
'💅 style: Code Style, Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)',
},
{
value: '⏪ revert',
name: '⏪ revert: Revert to a commit',
},
],
scopes: ['test', 'module', 'docs', 'config'],
allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix'],
};
1 change: 1 addition & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "path": "cz-customizable" }
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/lambda/mock/**
/scripts
/config
/example
_test_
__test__

/node_modules
jest*
/es
/lib
/docs
34 changes: 34 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
extends: [require.resolve('@umijs/fabric/dist/eslint')],
globals: {
page: true,
},
rules: {
'import/no-extraneous-dependencies': 0,
'import/default': 0,
'import/no-unresolved': 0,
'import/no-named-as-default-member': 0,
'import/named': 0,
'no-param-reassign': 0,
'consistent-return': 0,
'no-restricted-globals': 0,
'no-continue': 0,
'no-shadow': 'warn',
'no-console': 0,
'no-underscore-dangle': 0,
},
settings: {
'import/resolver': {
alias: {
map: [
['uxdm', './packages/uxdm/src'],
['@uxdm/schema', './packages/schema/src'],
['@uxdm/model-sketch', './packages/model-sketch/src'],
],
},
typescript: {
alwaysTryTypes: true,
},
},
},
};
8 changes: 8 additions & 0 deletions .fatherrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
entry: 'src/index.ts',
cjs: 'babel',
esm: {
type: 'babel',
importLibToEs: true,
},
};
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: '报告Bug 🐛'
about: 报告 bug
title: '🐛[BUG]'
labels: '🐛 BUG'
assignees: ''
---

### 🐛 bug 描述

<!--
详细地描述 bug,让大家都能理解
-->

### 📷 复现步骤

<!--
清晰描述复现步骤,让别人也能看到问题
-->

### 🏞 期望结果

<!--
描述你原本期望看到的结果
-->

### 💻 复现代码

<!--
提供可复现的代码,仓库,或线上示例
(可在下方 codesandbox 链接中添加你的最小可复现 demo)
-->

[可复现 demo]()

### © 版本信息

- 版本: [e.g. 1.0.0]
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

<!--
如截图等其他信息可以贴在这里
-->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: '功能需求 ✨'
about: 需求或建议
title: '👑 [需求]'
labels: '👑 Feature'
assignees: ''
---

### 🥰 需求描述

<!--
详细地描述问题,让大家都能理解
-->

### 🧐 解决方案

<!--
如果你有解决方案,在这里清晰地阐述
-->

### 🚑 其他信息

<!--
如截图等其他信息可以贴在这里
-->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: '疑问或需要帮助 ❓'
about: 使用的疑问或需要帮助
title: '🧐[问题]'
labels: '🧐 Question'
assignees: ''
---

### 🧐 问题描述

<!--
详细地描述问题,让大家都能理解
-->

### 💻 示例代码

<!--
如果有必要,展示代码,线上示例,或仓库
-->

### 🚑 其他信息

<!--
如截图等其他信息可以贴在这里
-->
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy CI

on:
release:
types: [published]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@master
- name: Install and Build 🔧
run: |
yarn
yarn run lint
yarn run site:build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.6.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
23 changes: 23 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Surge PR Preview

on:
push:
branches:
- master
pull_request_target:
branches:
- master

jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: afc163/surge-preview@v1
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
build: |
npm install
npm run site:preview
dist: dist
14 changes: 14 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Automatic Rebase
uses: cirrus-actions/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test CI
on: [push, pull_request]
jobs:
test:
runs-on: macos-latest

steps:
- name: checkout
uses: actions/checkout@master

- name: install
run: rm -rf yarn.lock && yarn

- name: lint
run: yarn check:lint && yarn check:typings && yarn check:circular

- name: test
run: yarn test:coverage

- name: Generate coverage
run: bash <(curl -s https://codecov.io/bash)
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
**/node_modules

# production
dist
/.vscode
es
lib

# misc
.DS_Store
storybook-static
npm-debug.log*
yarn-error.log

coverage
.idea
package-lock.json
*bak
.vscode

# visual studio code
.history
*.log
functions/*
lambda/mock/index.js
.temp/**

# umi
.umi
.umi-production

# screenshot
screenshot
.firebase
example/.temp/*
.eslintcache

apis
3 changes: 3 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tasks:
- init: yarn
command: npm start
18 changes: 18 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
**/*.svg
.umi
.umi-production
/dist
.dockerignore
.DS_Store
.eslintignore
*.png
*.toml
docker
.editorconfig
Dockerfile*
.gitignore
.prettierignore
LICENSE
.eslintcache
*.lock
yarn-error.log
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "never",
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
]
}
5 changes: 5 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const fabric = require('@umijs/fabric');

module.exports = {
...fabric.stylelint,
};
Loading

0 comments on commit 2ef0ee6

Please sign in to comment.