Skip to content

Commit c27cd4f

Browse files
committed
Merged in tstemplate-v1.2.1 (pull request #5)
Tstemplate v1.2.1 Approved-by: John Martin
2 parents cbe9ffa + d760e7a commit c27cd4f

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

CHANGELOG.md

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

3+
## [v1.2.1]
4+
5+
### Fixes
6+
- [TSTEMPLATE-3][Docs] Typedoc --excludeNotExported switch is deprecated
7+
- [TSTEMPLATE-4] Seperate index.ts from main.ts
8+
- [TSTEMPLATE-5] Source mapping should be loaded before imports
9+
- [TSTEMPLATE-6] main() entrypoint should have catch block
10+
311
## [v1.2.0]
412

513
### Additions

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "MY_APP",
33
"version": "1.0.0",
4-
"ts-project-version": "1.2.0",
4+
"ts-project-version": "1.2.1",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"scripts": {
@@ -18,7 +18,7 @@
1818
"webpack:prod": "./node_modules/.bin/webpack --mode=production",
1919
"preprocess": "",
2020
"postprocess": "",
21-
"doc": "typedoc --out docs src --excludeNotExported",
21+
"doc": "typedoc --out docs src",
2222
"lint": "eslint . --ext .ts --fix",
2323
"lint:prod": "eslint . --ext .ts --fix --config=.eslintrc.prod.json",
2424
"coverage": "nyc npm run coverage-test",

src/index.ts

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import { logger } from './logger';
2-
import { env } from './environment';
3-
1+
// Bootstrap source mapping
42
import * as sourceMapper from 'source-map-support';
53

64
sourceMapper.install({
75
environment: 'node'
86
});
97

10-
async function main() {
11-
logger.info('Hello ' + env.APP_TITLE);
12-
}
13-
main();
8+
// Enter application
9+
import './main';

src/main.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { logger } from './logger';
2+
import { env } from './environment';
3+
4+
async function main() {
5+
logger.info('Hello ' + env.APP_TITLE);
6+
}
7+
main()
8+
.catch(error => {
9+
logger.error(error);
10+
process.exit();
11+
});

0 commit comments

Comments
 (0)