Skip to content

Commit 8e53f15

Browse files
committed
Merged in tstemplate-v1.2.4 (pull request #8)
Tstemplate v1.2.4 Approved-by: John Martin
2 parents 6c1557a + f641732 commit 8e53f15

10 files changed

+52
-52
lines changed

.eslintrc.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
{
1414
"files": ["*.ts"],
1515
"parserOptions": {
16-
"project": ["./tsconfig.json", "./tsconfig.spec.json"]
16+
"project": ["./tsconfig.json"]
1717
}
1818
}
1919
],
2020
"rules": {
2121
"curly": 2,
2222
"indent": [2, "tab"],
2323
"max-len": [1, 80],
24-
"no-empty": 2,
24+
"no-empty": 1,
25+
"@typescript-eslint/no-empty-interface": 1,
2526
"no-eval": 2,
2627
"@typescript-eslint/no-misused-new": "error",
2728
"no-trailing-spaces": 2,

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ typings/
6262

6363
# Build directory
6464
dist/
65-
dist-test/
6665

6766
# Environment Variables
6867
.env

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Typescript Project Template
22

3+
## [v1.2.4]
4+
5+
### Fixes
6+
- [TSTEMPLATE-18] Add instructions in readme that MY_APP replacement should not contain spaces
7+
- [TSTEMPLATE-17] Environment file should merge declaration and definitions
8+
- [TSTEMPLATE-16] Build should clear dist
9+
- [TSTEMPLATE-15] Set no-empty eslint rule to warn instead of error
10+
- [TSTEMPLATE-14] Remove tsconfig.spec.json
11+
- [TSTEMPLATE-13] Switch tsconfig to output es6
12+
313
## [v1.2.3]
414

515
### Fixes

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Installation
44

55
1. Fork this repo
6-
2. Replace MY_APP with the name of your app project-wide
6+
2. Replace MY_APP with the name of your app project-wide (**No Spaces or special characters!**)
77
3. `npm i`
88
4. Update the documentation, changelog, etc
99

jasmine.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"spec_dir": "./dist-test",
2+
"spec_dir": "./dist",
33
"spec_files": [ "**/*[sS]pec.js" ],
44
"helpers": [ "helpers/**/*.js" ],
55
"stopSpecOnExpectationFailure": false,

package-lock.json

+19-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
22
"name": "MY_APP",
33
"version": "1.0.0",
4-
"ts-project-version": "1.2.3",
4+
"ts-project-version": "1.2.4",
55
"scripts": {
66
"start": "npm run dev",
77
"dev": "npm run lint && ts-node src/index.ts",
8-
"test": "npm run build:dev && npm run build:spec && npm run coverage",
9-
"clean": "rm -rf dist dist-test",
8+
"test": "npm run build:dev:clean && npm run coverage",
9+
"clean": "rm -rf dist",
1010
"build:dev": "npm run lint && npm run preprocess && npm run compile && npm run postprocess",
1111
"build:dev:clean": "npm run clean && npm run build:dev",
12-
"build:spec": "tsc --p tsconfig.spec.json",
1312
"build:prod": "npm run preprocess prod && npm run lint:prod && npm run compile && npm run postprocess prod",
1413
"build:prod:clean": "npm run clean && npm run build:prod",
1514
"compile": "./node_modules/.bin/tsc",
@@ -29,15 +28,15 @@
2928
"devDependencies": {
3029
"@istanbuljs/nyc-config-typescript": "^1.0.1",
3130
"@types/jasmine": "^3.9.1",
32-
"@types/node": "^12.20.28",
31+
"@types/node": "^12.20.32",
3332
"@typescript-eslint/eslint-plugin": "^4.33.0",
3433
"@typescript-eslint/parser": "^4.33.0",
3534
"coveralls": "^3.1.1",
3635
"eslint": "^7.32.0",
3736
"jasmine": "^3.9.0",
3837
"nyc": "^15.1.0",
39-
"ts-node": "^10.2.1",
38+
"ts-node": "^10.3.0",
4039
"typedoc": "^0.21.9",
41-
"typescript": "^4.4.3"
40+
"typescript": "^4.4.4"
4241
}
4342
}

src/environment.ts

+6-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ const envfile = dotenv.config();
44
/**
55
* Environment Variables Schema
66
*/
7-
export interface Environment {
8-
APP_TITLE: string
7+
export class Environment {
8+
APP_TITLE = 'MY_APP';
99
}
1010

11-
/**
12-
* Default Values
13-
*/
14-
const defaults: Environment = {
15-
APP_TITLE: 'MY_APP'
16-
};
17-
1811
// Export
19-
export const env: Environment = Object.assign(defaults, envfile.parsed);
12+
export const env: Environment = Object.assign(
13+
new Environment(),
14+
envfile.parsed
15+
);

tsconfig.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@
99
"moduleResolution": "node",
1010
"emitDecoratorMetadata": true,
1111
"experimentalDecorators": true,
12-
"target": "es5",
12+
"target": "es6",
1313
"types": ["node"],
1414
"typeRoots": ["node_modules/@types", "./"],
1515
"lib": ["es2017"]
1616
},
1717
"exclude": [
18-
"./test/",
1918
"./dist/"
19+
],
20+
"include": [
21+
"./example/",
22+
"./src/",
23+
"./test/"
2024
]
2125
}

tsconfig.spec.json

-9
This file was deleted.

0 commit comments

Comments
 (0)