From dd69a435438af670abb32da895dbf5dd7da1576a Mon Sep 17 00:00:00 2001 From: Ronan Connolly Date: Fri, 3 May 2024 20:13:31 +0200 Subject: [PATCH] Add API key --- .gitignore | 3 +- project.json | 31 ++++++++++++++++----- src/environments/environment.development.ts | 5 ++++ src/environments/environment.ts | 5 ++++ 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 src/environments/environment.development.ts create mode 100644 src/environments/environment.ts diff --git a/.gitignore b/.gitignore index c113572..3650991 100644 --- a/.gitignore +++ b/.gitignore @@ -41,4 +41,5 @@ Thumbs.db .nx/cache .angular -misc/ \ No newline at end of file +misc/ +.env \ No newline at end of file diff --git a/project.json b/project.json index 84d855b..b5e3808 100644 --- a/project.json +++ b/project.json @@ -8,15 +8,22 @@ "targets": { "build": { "executor": "@angular-devkit/build-angular:application", - "outputs": ["{options.outputPath}"], + "outputs": [ + "{options.outputPath}" + ], "options": { "outputPath": "dist/movie-search", "index": "./src/index.html", "browser": "./src/main.ts", - "polyfills": ["zone.js"], + "polyfills": [ + "zone.js" + ], "tsConfig": "./tsconfig.app.json", "inlineStyleLanguage": "scss", - "assets": ["./src/favicon.ico", "./src/assets"], + "assets": [ + "./src/favicon.ico", + "./src/assets" + ], "styles": [ "@angular/material/prebuilt-themes/purple-green.css", "./src/styles.scss" @@ -42,7 +49,13 @@ "development": { "optimization": false, "extractLicenses": false, - "sourceMap": true + "sourceMap": true, + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.development.ts" + } + ] } }, "defaultConfiguration": "production" @@ -68,12 +81,16 @@ "lint": { "executor": "@nx/eslint:lint", "options": { - "lintFilePatterns": ["./src"] + "lintFilePatterns": [ + "./src" + ] } }, "test": { "executor": "@nx/jest:jest", - "outputs": ["{workspaceRoot}/coverage/{projectName}"], + "outputs": [ + "{workspaceRoot}/coverage/{projectName}" + ], "options": { "jestConfig": "jest.config.ts" } @@ -88,4 +105,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts new file mode 100644 index 0000000..868bb71 --- /dev/null +++ b/src/environments/environment.development.ts @@ -0,0 +1,5 @@ +// TODO: Hide secret +export const environment = { + production: false, + API_KEY: '354f3620f819bb22bd2bbe52ce8ec3dc', +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts new file mode 100644 index 0000000..d51d76c --- /dev/null +++ b/src/environments/environment.ts @@ -0,0 +1,5 @@ +// TODO: Hide secret +export const environment = { + production: true, + API_KEY: '354f3620f819bb22bd2bbe52ce8ec3dc', +};