Let typescript do the json resolution so we get proper types

Change-type: patch
This commit is contained in:
Pagan Gazzard 2018-11-02 15:57:35 +00:00
parent 5084c0c73f
commit 2a17184d32
3 changed files with 5 additions and 8 deletions

View File

@ -1,7 +1,8 @@
import * as _ from 'lodash'; import * as _ from 'lodash';
import * as packageJson from '../../package.json'; import * as packageJson from '../../package.json';
let version = (packageJson as any).version; let version = packageJson.version;
const tagExtra = process.env.SUPERVISOR_TAG_EXTRA; const tagExtra = process.env.SUPERVISOR_TAG_EXTRA;
if (!_.isEmpty(tagExtra)) { if (!_.isEmpty(tagExtra)) {
version += '+' + tagExtra; version += '+' + tagExtra;

View File

@ -8,10 +8,11 @@
"removeComments": true, "removeComments": true,
"sourceMap": true, "sourceMap": true,
"strictNullChecks": true, "strictNullChecks": true,
"outDir": "./build/src/", "outDir": "./build/",
"lib": [ "lib": [
"es6" "es6"
] ],
"resolveJsonModule": true
}, },
"include": [ "include": [
"src/**/*.ts", "src/**/*.ts",

View File

@ -1,5 +0,0 @@
// Allow importing of json files with typescript
declare module '*.json' {
const value: { [key: string]: any };
export default value;
}