Skip to content

Commit 2851981

Browse files
committed
Inital commit
0 parents  commit 2851981

File tree

9 files changed

+1993
-0
lines changed

9 files changed

+1993
-0
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
data
3+
dist
4+
dts
5+
yarn-error.log
6+
.env

.gitignore

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
data
2+
.DS_Store
3+
dist
4+
dts
5+
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
14+
# Diagnostic reports (https://nodejs.org/api/report.html)
15+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# Directory for instrumented libs generated by jscoverage/JSCover
24+
lib-cov
25+
26+
# Coverage directory used by tools like istanbul
27+
coverage
28+
*.lcov
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
34+
.grunt
35+
36+
# Bower dependency directory (https://bower.io/)
37+
bower_components
38+
39+
# node-waf configuration
40+
.lock-wscript
41+
42+
# Compiled binary addons (https://nodejs.org/api/addons.html)
43+
build/Release
44+
45+
# Dependency directories
46+
node_modules/
47+
jspm_packages/
48+
49+
# TypeScript v1 declaration files
50+
typings/
51+
52+
# TypeScript cache
53+
*.tsbuildinfo
54+
55+
# Optional npm cache directory
56+
.npm
57+
58+
# Optional eslint cache
59+
.eslintcache
60+
61+
# Microbundle cache
62+
.rpt2_cache/
63+
.rts2_cache_cjs/
64+
.rts2_cache_es/
65+
.rts2_cache_umd/
66+
67+
# Optional REPL history
68+
.node_repl_history
69+
70+
# Output of 'npm pack'
71+
*.tgz
72+
73+
# Yarn Integrity file
74+
.yarn-integrity
75+
76+
# dotenv environment variables file
77+
.env
78+
.env.test
79+
80+
# parcel-bundler cache (https://parceljs.org/)
81+
.cache
82+
83+
# Next.js build output
84+
.next
85+
86+
# Nuxt.js build / generate output
87+
.nuxt
88+
dist
89+
90+
# Gatsby files
91+
.cache/
92+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
93+
# https://nextjs.org/blog/next-9-1#public-directory-support
94+
# public
95+
96+
# vuepress build output
97+
.vuepress/dist
98+
99+
# Serverless directories
100+
.serverless/
101+
102+
# FuseBox cache
103+
.fusebox/
104+
105+
# DynamoDB Local files
106+
.dynamodb/
107+
108+
# TernJS port file
109+
.tern-port

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:13
2+
3+
WORKDIR /usr/app
4+
5+
COPY package.json .
6+
7+
RUN yarn install
8+
9+
COPY . .
10+
11+
RUN yarn run build
12+
13+
CMD ["yarn", "start"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Max Isom
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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TypeScript Package Template
2+
3+
With XO/ESLint, nodemon, and Docker.

nodemon.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"ignore": ["**/*.test.ts", "**/*.spec.ts", ".git", "node_modules"],
3+
"watch": ["src"],
4+
"exec": "npm start",
5+
"ext": "ts"
6+
}

package.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"name": "",
3+
"version": "0.1.0",
4+
"description": "",
5+
"main": "dist/index.js",
6+
"repository": "git@github.com:codetheweb/",
7+
"author": "Max Isom <hi@maxisom.me>",
8+
"license": "MIT",
9+
"files": [
10+
"dist",
11+
"dts"
12+
],
13+
"scripts": {
14+
"lint": "eslint 'src/**/*.ts'",
15+
"lint-fix": "eslint 'src/**/*.ts' --fix",
16+
"clean": "rm -rf dist dts",
17+
"test": "npm run lint",
18+
"build": "tsc",
19+
"watch": "tsc --watch",
20+
"prepack": "npm run clean && npm run build",
21+
"start": "node dist/index.js",
22+
"dev": "nodemon"
23+
},
24+
"devDependencies": {
25+
"@types/node": "^13.9.5",
26+
"@typescript-eslint/eslint-plugin": "^2.25.0",
27+
"@typescript-eslint/parser": "^2.25.0",
28+
"eslint": "^6.8.0",
29+
"eslint-config-xo": "^0.29.1",
30+
"eslint-config-xo-typescript": "^0.27.0",
31+
"husky": "^4.2.3",
32+
"nodemon": "^2.0.2",
33+
"ts-node": "^8.8.1",
34+
"typescript": "^3.8.3"
35+
},
36+
"eslintConfig": {
37+
"extends": [
38+
"xo",
39+
"xo-typescript/space"
40+
],
41+
"parser": "@typescript-eslint/parser",
42+
"parserOptions": {
43+
"project": "./tsconfig.json"
44+
},
45+
"rules": {
46+
"new-cap": "off",
47+
"@typescript-eslint/no-unused-vars": "off",
48+
"@typescript-eslint/no-unused-vars-experimental": "error",
49+
"@typescript-eslint/prefer-readonly-parameter-types": "off"
50+
}
51+
},
52+
"husky": {
53+
"hooks": {
54+
"pre-commit": "npm test && npm run build"
55+
}
56+
},
57+
"dependencies": {
58+
}
59+
}

tsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["ES2017"],
4+
"target": "es6",
5+
"module": "commonjs",
6+
"declaration": true,
7+
"outDir": "dist",
8+
"declarationDir": "dts",
9+
"strict": true,
10+
"experimentalDecorators": true,
11+
"emitDecoratorMetadata": true,
12+
"esModuleInterop": true,
13+
"sourceMap": true
14+
},
15+
"include": ["src"],
16+
"exclude": ["node_modules"]
17+
}

0 commit comments

Comments
 (0)