feat: 🎸 modify repo config & template config

add several config files to repo & template
This commit is contained in:
gengyang 2020-02-22 20:27:43 +08:00
parent 9d2967f612
commit 049e6cb1d0
6 changed files with 44 additions and 35 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single
[*.md]
trim_trailing_whitespace = false

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
**/test/**/*.ts
**/test/**/*.js

View File

@ -1,5 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5"
"singleQuote": true
}

View File

@ -1,18 +1,7 @@
Ali Lowcode Engine阿里低代码引擎
---
## Ali Lowcode Engine阿里低代码引擎
[Lerna](https://github.com/lerna/lerna) + [TS](https://www.typescriptlang.org/)
## 准备
```bash
npm login --registry http://registry.npm.alibaba-inc.com --scope @ali
```
```bash
tnpm i -g git-cz
```
## 开发
#### 创建新包:
@ -35,7 +24,7 @@ tnpm i -g git-cz
#### 开发过程中:
- `git add <your-files>`
- `git cz`
- `npm run commit`
## 发布
@ -43,7 +32,7 @@ tnpm i -g git-cz
## 注意
- Commit 动作尽量使用 `git cz`,方便按语义化版本自动递增,以及自动生成 `CHANGELOG.md`
- Commit 动作尽量使用 `npm run commit`,其内部调用了 `git cz`,方便按语义化版本自动递增,以及自动生成 `CHANGELOG.md`
- `packages` 工程里一些开发时公共依赖(比如:`typescript``ava` 等)会放到工程顶层
- 工程里的 `.md``test/` 等文件修改不会产生新的发布
- 当工程里存在多个 ts 文件的目录时,最终产生的文件会按文件夹形式放到 `lib`

View File

@ -2,13 +2,15 @@
"name": "ali-lowcode-engine",
"private": true,
"scripts": {
"boot": "lerna bootstrap --registry http://registry.npm.alibaba-inc.com",
"boot": "lerna bootstrap --registry http://registry.npm.alibaba-inc.com --hoist",
"clean": "rimraf ./packages/*/lib ./packages/*/node_modules",
"pub": "npm run test && lerna publish --registry http://registry.npm.alibaba-inc.com",
"lint": "tslint -p tsconfig.json",
"lint:fix": "tslint --fix -p tsconfig.json",
"build": "lerna run build",
"test": "lerna run test"
"test": "lerna run test",
"test:snapshot": "lerna run test:snapshot",
"commit": "git-cz"
},
"devDependencies": {
"@types/node": "^10.12.18",

View File

@ -8,10 +8,12 @@
],
"scripts": {
"build": "tsc",
"test": "ava"
"test": "ava",
"test:snapshot": "ava --update-snapshots"
},
"ava": {
"compileEnhancements": false,
"snapshotDir": "test/fixtures/__snapshots__",
"extensions": [
"ts"
],