Skip to content

Commit

Permalink
Run fyle and c1 theme simultaneouly in local POC (#846)
Browse files Browse the repository at this point in the history
* Run fyle and c1 theme simultaneously in local POC
  • Loading branch information
DhaaraniCIT authored Jun 21, 2024
1 parent a73d39c commit e561560
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit e561560

Please sign in to comment.