From 90163756314a1eefd88a78409c2823eecb8e70f8 Mon Sep 17 00:00:00 2001 From: Gavin Nitta Date: Thu, 31 Aug 2017 13:18:45 -0600 Subject: [PATCH] Add environment variable defaults --- src/environments/environment.prod.ts | 3 +++ src/environments/environment.ts | 7 +++++++ tsconfig.json | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/environments/environment.prod.ts create mode 100644 src/environments/environment.ts diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts new file mode 100644 index 0000000..b984978 --- /dev/null +++ b/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const ENV = { + production: true +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..e32d97a --- /dev/null +++ b/src/environments/environment.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.ts`. +// When you run a build command using a flag, (e.g. --prod) then `environment.prod.ts` will be used instead. + +export const ENV = { + production: false +}; 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"