Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add full monorepo support #44

Merged
merged 6 commits into from
Jun 4, 2023
Merged

feat: add full monorepo support #44

merged 6 commits into from
Jun 4, 2023

Conversation

chihab
Copy link
Owner

@chihab chihab commented May 29, 2023

Given:

/home/user/monorepo
 apps
    frontend1
       .env
    frontend2
       .env.dev
       .env
.env
.env.dev

and the configuration below in frontends' angular.json:

"ngxEnv": {
  "prefix": "NGX_",
  "path": "../../"
},

Consumed dot env files will be ordered by hierarchy as follows:
frontend1

/home/user/monorepo/apps/frontend1/.env
/home/user/monorepo/.env.dev
/home/user/monorepo/.env

frontend2

/home/user/monorepo/apps/frontend2/.env.dev
/home/user/monorepo/apps/frontend2/.env
/home/user/monorepo/.env.dev
/home/user/monorepo/.env

ngxEnv configuration
These paths are equivalent:
"path": "../../"
"path": "../../.env"
"path": "/home/user/monorepo"
"path": "/home/user/monorepo/.env"

@chihab
Copy link
Owner Author

chihab commented May 29, 2023

@otonielguajardo it would be great if you could take a look at this PR to follow up on our discussion here #43 :)

@otonielguajardo
Copy link
Contributor

This looks awesome @chihab,

This will make it much easier to work with global environment variables in monorepos that include Angular applications.

@chihab chihab force-pushed the feature-env-path branch 2 times, most recently from d1cbb63 to 6d6441a Compare June 4, 2023 07:11
@chihab chihab force-pushed the feature-env-path branch from 6d6441a to 1e94167 Compare June 4, 2023 07:23
@chihab chihab force-pushed the feature-env-path branch 4 times, most recently from 2808800 to 13c54ef Compare June 4, 2023 22:39
@chihab chihab force-pushed the feature-env-path branch from 13c54ef to ba77cac Compare June 4, 2023 22:44
@chihab chihab merged commit 092dea7 into main Jun 4, 2023
@chihab chihab deleted the feature-env-path branch January 7, 2024 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants