From 7f0aeeb2342a55130b04ae18c052f7f35b055e0d Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Tue, 23 Jul 2019 19:39:43 -0700 Subject: [PATCH] Use import for package.json file. --- generator/src/elm-markup-pages.ts | 2 +- generator/tsconfig.json | 12 ++++++++++++ site/tsconfig.json | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 generator/tsconfig.json diff --git a/generator/src/elm-markup-pages.ts b/generator/src/elm-markup-pages.ts index 000567cf..4de118bb 100644 --- a/generator/src/elm-markup-pages.ts +++ b/generator/src/elm-markup-pages.ts @@ -1,5 +1,5 @@ const { Elm } = require("./Main.elm"); -const { version } = require("../../package.json"); +import { version } from "../../package.json"; import * as fs from "fs"; import * as glob from "glob"; diff --git a/generator/tsconfig.json b/generator/tsconfig.json new file mode 100644 index 00000000..b78b9eba --- /dev/null +++ b/generator/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "types": ["node"], + "module": "commonjs", + "target": "es5", + "strict": true, + "sourceMap": false, + "resolveJsonModule": true, + "lib": ["es2015", "es2017.object"] + }, + "exclude": ["node_modules", "generated"] +} diff --git a/site/tsconfig.json b/site/tsconfig.json index c33d0b50..b78b9eba 100644 --- a/site/tsconfig.json +++ b/site/tsconfig.json @@ -5,6 +5,7 @@ "target": "es5", "strict": true, "sourceMap": false, + "resolveJsonModule": true, "lib": ["es2015", "es2017.object"] }, "exclude": ["node_modules", "generated"]