Skip to content

Commit 2348d9c

Browse files
committed
📌 Init: finish first commit
0 parents  commit 2348d9c

13 files changed

+3921
-0
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.eslintrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "standard-with-typescript",
3+
"parserOptions": {
4+
"project": "./tsconfig.json"
5+
}
6+
}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
.DS_Store
4+
yarn-error.log
5+
package-lock.json

.vscode/settings.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"eslint.enable": true,
3+
"editor.codeActionsOnSave": {
4+
"source.fixAll.eslint": true
5+
},
6+
"eslint.alwaysShowStatus": true,
7+
"eslint.validate": [
8+
"javascript",
9+
"javascriptreact",
10+
"typescript",
11+
"typescriptreact"
12+
]
13+
}

License

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

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# TypeScript-Node-Template
2+
3+
Quickly starting to build a project using TS in Node.
4+
5+
## Usage
6+
7+
### Development
8+
9+
```bash
10+
npm run dev
11+
```
12+
13+
It will enter watch-mode with `tsc`
14+
15+
### Production
16+
17+
```bash
18+
npm run build
19+
```
20+
21+
It uses [rollup](https://github.com/rollup/rollup) for building production codes.
22+
23+
## License
24+
25+
[MIT](http://opensource.org/licenses/MIT)
26+
27+
Copyright (c) 2020 Molunerfin

index.js

Whitespace-only changes.

package.json

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "typescript-node-template",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "dist/index.js",
6+
"typings": "dist/index.d.ts",
7+
"scripts": {
8+
"dev": "tsc -w -p .",
9+
"build": "rollup -c",
10+
"lint": "eslint src/**",
11+
"test": "echo \"Error: no test specified\" && exit 1",
12+
"cz": "git-cz",
13+
"release": "bump-version"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/Molunerfinn/typescript-node-template.git"
18+
},
19+
"author": "Molunerfinn",
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/Molunerfinn/typescript-node-template/issues"
23+
},
24+
"husky": {
25+
"hooks": {
26+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
27+
}
28+
},
29+
"config": {
30+
"commitizen": {
31+
"path": "./node_modules/cz-customizable"
32+
},
33+
"cz-customizable": {
34+
"config": "./node_modules/@picgo/bump-version/.cz-config.js"
35+
}
36+
},
37+
"commitlint": {
38+
"extends": [
39+
"./node_modules/@picgo/bump-version/commitlint-picgo"
40+
]
41+
},
42+
"homepage": "https://github.com/Molunerfinn/typescript-node-template#readme",
43+
"devDependencies": {
44+
"@commitlint/cli": "^8.3.5",
45+
"@picgo/bump-version": "^1.0.3",
46+
"@types/node": "^13.1.7",
47+
"@typescript-eslint/eslint-plugin": "2",
48+
"commitizen": "^4.0.3",
49+
"conventional-changelog": "^3.1.18",
50+
"cz-customizable": "^6.2.0",
51+
"eslint": "6",
52+
"eslint-config-standard-with-typescript": "^11.0.1",
53+
"eslint-plugin-import": "2",
54+
"eslint-plugin-node": "9",
55+
"eslint-plugin-promise": "4",
56+
"eslint-plugin-standard": "4",
57+
"husky": "^4.0.10",
58+
"rollup": "^1.29.0",
59+
"rollup-plugin-terser": "^5.2.0",
60+
"rollup-plugin-typescript2": "^0.25.3",
61+
"typescript": "^3.7.4"
62+
}
63+
}

rollup.config.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { terser } from 'rollup-plugin-terser'
2+
import typescript from 'rollup-plugin-typescript2'
3+
export default {
4+
input: './src/index.ts',
5+
plugins: [
6+
typescript({
7+
tsconfigOverride: {
8+
compilerOptions: {
9+
module: 'ESNext'
10+
}
11+
}
12+
}),
13+
terser()
14+
],
15+
output: [{
16+
format: 'cjs',
17+
file: 'dist/index.js',
18+
sourcemap: false
19+
}]
20+
}

src/index.ts

Whitespace-only changes.

src/types/.gitkeep

Whitespace-only changes.

tsconfig.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"compilerOptions": {
3+
"noUnusedLocals": true,
4+
"noUnusedParameters": true,
5+
"target": "ES2020",
6+
"module": "CommonJS",
7+
"strict": true,
8+
"jsx": "preserve",
9+
"importHelpers": true,
10+
"moduleResolution": "node",
11+
"resolveJsonModule": true,
12+
"esModuleInterop": true,
13+
"experimentalDecorators": true,
14+
"declaration": true,
15+
"allowSyntheticDefaultImports": true,
16+
"baseUrl": ".",
17+
"types": ["node"],
18+
"outDir": "dist",
19+
"typeRoots": [
20+
"./src/types/*",
21+
],
22+
"paths": {
23+
"src/*": [
24+
"src/*"
25+
]
26+
},
27+
"lib": [
28+
"ScriptHost",
29+
"esnext",
30+
"DOM"
31+
]
32+
},
33+
"include": [
34+
"src/**/*.ts",
35+
"tests/**/*.ts",
36+
],
37+
"exclude": [
38+
"node_modules"
39+
]
40+
}

0 commit comments

Comments
 (0)