diff --git a/.gitignore b/.gitignore index c8f60ccdf..f1383f9a5 100644 --- a/.gitignore +++ b/.gitignore @@ -59,7 +59,11 @@ docker-compose.yml setup.sh secrets.sh src/environments/environment.json +src/environments/c1-environment.json +src/environments/fyle-environment.json src/app/branding/config.json +src/app/branding/c1-config.json +src/app/branding/fyle-config.json # Tests cypress/videos diff --git a/README.md b/README.md index a90265e79..743ae429f 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,50 @@ Follow instructions mentioned in [Integrations Central](https://github.com/fylei cp ../fyle-integrations-central/app-secrets/integrations-app/config.json src/app/branding/config.json ``` +* Copy `fyle-environment.json` from integrations-central/ and add it to `src/environments` + + ```bash + cp ../fyle-integrations-central/app-secrets/integrations-app/environment.json src/environments/fyle-environment.json + cp ../fyle-integrations-central/app-secrets/integrations-app/config.json src/app/branding/fyle-config.json + ``` + +* Copy `c1-environment.json` from integrations-central/ and add it to `src/environments` + + ```bash + cp ../fyle-integrations-central/app-secrets/integrations-app/environment.json src/environments/c1-environment.json + cp ../fyle-integrations-central/app-secrets/integrations-app/config.json src/app/branding/c1-config.json + ``` + * Run app ```bash npm start ``` +* Run app in Fyle theme + + ```bash + npm run start:fyle + ``` + + or + + ```bash + ng serve --configuration=fyle + ``` + +* Run app in Capital One theme + + ```bash + npm run start:c1 + ``` + + or + + ```bash + ng serve --configuration=c1 + ``` + * Run unit test ```bash diff --git a/angular.json b/angular.json index c447b010b..064541ce8 100644 --- a/angular.json +++ b/angular.json @@ -57,6 +57,30 @@ "extractLicenses": false, "sourceMap": true, "namedChunks": true + }, + "fyle": { + "fileReplacements": [ + { + "replace": "src/app/branding/config.json", + "with": "src/app/branding/fyle-config.json" + }, + { + "replace": "src/environments/environment.json", + "with": "src/environments/fyle-environment.json" + } + ] + }, + "c1": { + "fileReplacements": [ + { + "replace": "src/app/branding/config.json", + "with": "src/app/branding/c1-config.json" + }, + { + "replace": "src/environments/environment.json", + "with": "src/environments/c1-environment.json" + } + ] } }, "defaultConfiguration": "production" @@ -69,6 +93,14 @@ }, "development": { "browserTarget": "fyle-integrations-app:build:development" + }, + "fyle": { + "browserTarget": "fyle-integrations-app:build:fyle", + "port": 4201 + }, + "c1": { + "browserTarget": "fyle-integrations-app:build:c1", + "port": 4202 } }, "defaultConfiguration": "development" diff --git a/package.json b/package.json index e39f39d04..66d9aedd1 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "generate:svg-sprite": "svg2sprite ./src/assets/icons ./src/assets/sprites/sprite.svg --stripAttrs fill --stripAttrs stroke --stripAttrs id", "stop": "kill $(lsof -t -i:4200) || true", "storybook": "ng run fyle-integrations-app:storybook", - "build-storybook": "npm run setup:env && npm run setup:branding && ng run fyle-integrations-app:build-storybook" + "build-storybook": "npm run setup:env && npm run setup:branding && ng run fyle-integrations-app:build-storybook", + "start:fyle": "ng serve --configuration=fyle", + "start:c1": "ng serve --configuration=c1" }, "private": true, "dependencies": {