From 29066c912f390cb00493a6de00046cbac3074a04 Mon Sep 17 00:00:00 2001 From: Gavin Nitta Date: Fri, 1 Sep 2017 15:18:08 -0600 Subject: [PATCH] Add environment variable defaults --- src/environments/environment.dev.ts | 7 +++++++ src/environments/environment.ts | 3 +++ tsconfig.json | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/environments/environment.dev.ts create mode 100644 src/environments/environment.ts diff --git a/src/environments/environment.dev.ts b/src/environments/environment.dev.ts new file mode 100644 index 0000000..d421598 --- /dev/null +++ b/src/environments/environment.dev.ts @@ -0,0 +1,7 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.dev.ts`. +// When you run a build command using a flag, (e.g. --prod) then `environment.ts` will be used instead. + +export const ENV = { + production: false +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..b984978 --- /dev/null +++ b/src/environments/environment.ts @@ -0,0 +1,3 @@ +export const ENV = { + production: true +}; diff --git a/tsconfig.json b/tsconfig.json index 2e450f9..f627dc5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,13 @@ "module": "es2015", "moduleResolution": "node", "sourceMap": true, - "target": "es5" + "target": "es5", + "baseUrl": "./src", + "paths": { + "@app/env": [ + "environments/environment" + ] + } }, "include": [ "src/**/*.ts"