Skip to content

Commit 92d2f79

Browse files
author
李太新
committed
first commit
0 parents  commit 92d2f79

File tree

127 files changed

+18953
-0
lines changed

Some content is hidden

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

127 files changed

+18953
-0
lines changed

.commitlintrc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": ["@commitlint/config-angular"],
3+
"rules": {
4+
"subject-case": [
5+
2,
6+
"always",
7+
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
8+
],
9+
"type-enum": [
10+
2,
11+
"always",
12+
[
13+
"build",
14+
"chore",
15+
"ci",
16+
"docs",
17+
"feat",
18+
"fix",
19+
"perf",
20+
"refactor",
21+
"revert",
22+
"style",
23+
"test",
24+
"sample"
25+
]
26+
]
27+
}
28+
}

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[*]
2+
end_of_line = lf
3+
insert_final_newline = true

.eslintrc.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:import/errors',
10+
'plugin:import/warnings',
11+
'plugin:import/typescript',
12+
'plugin:@typescript-eslint/eslint-recommended',
13+
'plugin:@typescript-eslint/recommended',
14+
'prettier',
15+
'@donews/eslint-config-donews',
16+
],
17+
root: true,
18+
env: {
19+
node: true,
20+
jest: true,
21+
},
22+
rules: {},
23+
};

.eslintrc.spec.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const baseConfig = require('./.eslintrc');
2+
3+
module.exports = {
4+
...baseConfig,
5+
parserOptions: {
6+
project: 'tsconfig.spec.json',
7+
sourceType: 'module',
8+
},
9+
rules: {
10+
...baseConfig.rules,
11+
'@typescript-eslint/no-empty-function': 'off',
12+
},
13+
};

.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# dependencies
2+
node_modules/
3+
4+
# IDE
5+
/.idea
6+
/.awcache
7+
/.vscode
8+
9+
# bundle
10+
packages/**/*.d.ts
11+
packages/**/*.js
12+
13+
# misc
14+
.DS_Store
15+
lerna-debug.log
16+
npm-debug.log
17+
yarn-error.log
18+
/**/npm-debug.log
19+
/packages/**/.npmignore
20+
/packages/**/LICENSE
21+
22+
# example
23+
/quick-start
24+
/example_dist
25+
/example
26+
27+
# tests
28+
/test
29+
/benchmarks/memory
30+
/coverage
31+
/.nyc_output
32+
/packages/graphql
33+
/benchmarks/memory
34+
build/config\.gypi

.npmignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# source
2+
**/*.ts
3+
*.ts
4+
5+
# definitions
6+
!**/*.d.ts
7+
!*.d.ts
8+
9+
# configuration
10+
package-lock.json
11+
tslint.json
12+
tsconfig.json
13+
.prettierrc

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
packages/**/*.d.ts
2+
packages/**/*.js

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"trailingComma": "all",
3+
"singleQuote": true
4+
}

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
'Software'), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# donews
2+
3+
donews nest 相关组件项目,采用 lerna 项目结构布局,减少项目数量,防止修改 lint 规则,等公共基础服务时,需要更新太多的项目。
4+
5+
目前包含组件
6+
7+
1. [config](./packages/nestjs-config#readme)
8+
2. [logger](./packages/nestjs-logger#readme)
9+
3. [prom](./packages/nestjs-prom#readme)
10+
4. [tracing](./packages/nestjs-tracing#readme)

gulpfile.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use strict';
2+
/**
3+
* Load the TypeScript compiler, then load the TypeScript gulpfile which simply loads all
4+
* the tasks. The tasks are really inside tools/gulp/tasks.
5+
*/
6+
7+
const path = require('path');
8+
9+
const projectDir = __dirname;
10+
const tsconfigPath = path.join(projectDir, 'tools/gulp/tsconfig.json');
11+
12+
require('ts-node').register({
13+
project: tsconfigPath
14+
});
15+
16+
require('./tools/gulp/gulpfile');

lerna.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"command": {
3+
"bootstrap": {
4+
"hoist": true
5+
}
6+
},
7+
"packages": [
8+
"packages/*"
9+
],
10+
"version": "0.7.7"
11+
}

0 commit comments

Comments
 (0)