Skip to content

Commit 07d72c1

Browse files
committed
feat: init project
1 parent 9eaa0f6 commit 07d72c1

17 files changed

+763
-0
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage
2+
dist
3+
node_modules
4+
example
5+
*.test.js

.eslintrc.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['prettier'],
4+
plugins: ['import', 'prettier'],
5+
env: {
6+
es6: true,
7+
jest: true,
8+
node: true
9+
},
10+
parser: 'babel-eslint',
11+
parserOptions: {
12+
ecmaVersion: 2018,
13+
sourceType: 'module',
14+
ecmaFeatures: {
15+
jsx: true
16+
}
17+
},
18+
globals: {
19+
on: true // for the Socket file
20+
},
21+
rules: {
22+
'array-bracket-spacing': [
23+
'error',
24+
'never',
25+
{
26+
objectsInArrays: false,
27+
arraysInArrays: false
28+
}
29+
],
30+
'arrow-parens': ['error', 'always'],
31+
'arrow-spacing': ['error', { before: true, after: true }],
32+
'comma-dangle': ['error', 'never'],
33+
curly: 'error',
34+
'eol-last': 'error',
35+
'func-names': 'off',
36+
'id-length': [
37+
'error',
38+
{
39+
min: 1,
40+
max: 50,
41+
properties: 'never',
42+
exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$']
43+
}
44+
],
45+
'no-alert': 'error',
46+
'no-console': 'off',
47+
'no-const-assign': 'error',
48+
'no-else-return': 'error',
49+
'no-empty': 'off',
50+
'no-shadow': 'error',
51+
'no-undef': 'error',
52+
'no-unused-vars': 'error',
53+
'no-use-before-define': 'error',
54+
'no-useless-constructor': 'error',
55+
'object-curly-newline': 'off',
56+
'object-shorthand': 'off',
57+
'prefer-const': 'error',
58+
'prefer-destructuring': ['error', { object: true, array: false }],
59+
quotes: [
60+
'error',
61+
'single',
62+
{
63+
allowTemplateLiterals: true,
64+
avoidEscape: true
65+
}
66+
],
67+
semi: ['error', 'never'],
68+
'spaced-comment': 'error',
69+
strict: ['error', 'global'],
70+
'prettier/prettier': 'error'
71+
}
72+
}

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.DS_Store
2+
*.sublime-project
3+
*.sublime-workspace
4+
*.log
5+
.serverless
6+
v8-compile-cache-*
7+
jest
8+
coverage
9+
.serverless_plugins
10+
testProjects/*/package-lock.json
11+
testProjects/*/yarn.lock
12+
.serverlessUnzipped
13+
node_modules
14+
.vscode
15+
.eslintcache
16+
dist
17+
.idea
18+
build
19+
.env*
20+
env.js
21+
package-lock.json
22+
yarn.lock

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: node_js
2+
3+
node_js:
4+
- 8
5+
- 10
6+
7+
install:
8+
- npm install
9+
10+
jobs:
11+
include:
12+
# Define the release stage that runs semantic-release
13+
- stage: release
14+
node_js: 10.18
15+
# Advanced: optionally overwrite your default `script` step to skip the tests
16+
# script: skip
17+
deploy:
18+
provider: script
19+
skip_cleanup: true
20+
script:
21+
- npm run release

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 1.0.0 (2020-03-22)
2+
3+
4+
### Features
5+
6+
* init project ([137dc1b](https://github.com/yugasun/release-ci-template/commit/137dc1b4663d2dbb047a11ecd3dfc7c75c20862d))
7+
8+
## [1.1.1](https://github.com/yugasun/release-ci-test/compare/v1.1.0...v1.1.1) (2020-03-22)
9+
10+
### Bug Fixes
11+
12+
- release note generate ([04de43c](https://github.com/yugasun/release-ci-test/commit/04de43c662f015598ea1ef7f0ff5f6459659286a))

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# release-ci-template
2+
3+
[![Build Status](https://travis-ci.com/yugasun/release-ci-test.svg?branch=master)](https://travis-ci.com/yugasun/release-ci-test)
4+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
5+
6+
Release ci project template.
7+
8+
## Usage
9+
10+
```bash
11+
$ git clone https://github.com/yugasun/release-ci-template my-project
12+
```
13+
14+
Change `npmPublish` to `true` for npm module project.
15+
16+
## License
17+
18+
MIT License
19+
20+
Copyright (c) 2020 yugasun

commitlint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const Configuration = {
2+
/*
3+
* Resolve and load @commitlint/config-conventional from node_modules.
4+
* Referenced packages must be installed
5+
*/
6+
extends: ['@commitlint/config-conventional']
7+
}
8+
9+
module.exports = Configuration

package.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"name": "tencent-component-toolkit",
3+
"version": "0.0.0",
4+
"description": "Tencent component toolkit",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"test": "npm run lint && npm run prettier",
8+
"commitlint": "commitlint -f HEAD@{15}",
9+
"lint": "eslint --ext .js,.ts,.tsx .",
10+
"lint:fix": "eslint --fix --ext .js,.ts,.tsx .",
11+
"prettier": "prettier --check **/*.{css,html,js,json,md,yaml,yml}",
12+
"prettier:fix": "prettier --write **/*.{css,html,js,json,md,yaml,yml}",
13+
"release": "semantic-release",
14+
"release-local": "node -r dotenv/config node_modules/semantic-release/bin/semantic-release --no-ci --dry-run",
15+
"check-dependencies": "npx npm-check --skip-unused --update"
16+
},
17+
"engines": {
18+
"node": ">=10.18"
19+
},
20+
"husky": {
21+
"hooks": {
22+
"pre-commit": "lint-staged",
23+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
24+
}
25+
},
26+
"lint-staged": {
27+
"**/*.{js,ts,tsx}": [
28+
"eslint --fix --ext .js,.ts,.tsx .",
29+
"git add ."
30+
],
31+
"**/*.{css,html,js,json,md,yaml,yml}": [
32+
"npm run prettier:fix",
33+
"git add ."
34+
]
35+
},
36+
"repository": {
37+
"type": "git",
38+
"url": "git+https://github.com/serverless-tencent/tencent-component-toolkit.git"
39+
},
40+
"keywords": [
41+
"template",
42+
"release",
43+
"ci"
44+
],
45+
"author": "Tencent Cloud Inc.",
46+
"license": "MIT",
47+
"bugs": {
48+
"url": "https://github.com/serverless-tencent/tencent-component-toolkit/issues"
49+
},
50+
"homepage": "https://github.com/serverless-tencent/tencent-component-toolkit#readme",
51+
"devDependencies": {
52+
"@commitlint/cli": "^8.3.5",
53+
"@commitlint/config-conventional": "^8.3.4",
54+
"@semantic-release/changelog": "^5.0.0",
55+
"@semantic-release/commit-analyzer": "^8.0.1",
56+
"@semantic-release/git": "^9.0.0",
57+
"@semantic-release/npm": "^7.0.4",
58+
"@semantic-release/release-notes-generator": "^9.0.1",
59+
"babel-eslint": "^10.1.0",
60+
"dotenv": "^8.2.0",
61+
"eslint": "^6.8.0",
62+
"eslint-config-prettier": "^6.10.0",
63+
"eslint-plugin-import": "^2.20.1",
64+
"eslint-plugin-prettier": "^3.1.2",
65+
"husky": "^4.2.3",
66+
"lint-staged": "^10.0.8",
67+
"prettier": "^1.19.1",
68+
"semantic-release": "^17.0.4"
69+
},
70+
"dependencies": {
71+
"@tencent-sdk/capi": "0.2.15",
72+
"@ygkit/request": "^0.0.6",
73+
"tencent-cloud-sdk": "^0.0.5"
74+
}
75+
}

prettier.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
arrowParens: 'always',
3+
printWidth: 100,
4+
semi: false,
5+
singleQuote: true,
6+
tabWidth: 2,
7+
trailingComma: 'none'
8+
}

0 commit comments

Comments
 (0)