kmathy / ngx-reduxor

ngx-reduxor: save time by generating ngrx architecture with no effort!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request `enviroment variables`

lexcaraig opened this issue · comments

I think it is good to automatically import the environment variable without using the relative path. I suggest configuring the ts-config.json file to add a config something like this.

"compilerOptions": {
    ...
    ],
    "lib": [
      ...
    ],
    "baseUrl": "src",
    "paths": {
      "@app/*": ["app/*"],
      "@env/*": ["environments/*"],
      "@core/*": ["app/core/*"],
      "@shared/*": ["app/shared/*"]
    }
  }

and then use the import as import { environment as env } from '@env/environment';

Hi,

Thanks for this suggestion! You have an interesting way to easily import files.

However, it is your way to develop, and maybe this cannot fit to everyone. Override the ts-config can be annoying for those didn't want this feature.
Moreover, if you want to change the import with your style, it is just one or two lines to edit.

Maybe the imports can be improved, but I don't think it is the best way to do it.

But thanks, you learned me something today 😄

Oh. Yeah. I just thought it would be a good practice. :) im glad you got something.

I thought about it last night, and I have an idea: if I open a wiki and a section about best practices, do you want to add your best practice? Like this, we can regroup each opinion in one place.

What do you think about this?

Yeah. Sure! That would be a great idea. And then have a link in the readme file that points to the wiki page. Let me know if I can contribute. So we can improve this. :)

Hi!

I didn't forget you, but I have ton of work this week... I began to write the wiki and some sections. Normally, you can edit directly.

Thank you for your contribution!