Skip to content

Computed values : seed.config #1429

Closed
Closed
@lifaon74

Description

@lifaon74

I re-open #968 because it's for me (and propably many users) still an important problem.

I work on windows 10, and computed values bother me a lot. Why :

  • build.prod is not working with external libraries like ng2-translate, moment, etc... WE need to add them into SYSTEM_BUILDER_CONFIG.packages.
  • some attributes like APP_CLIENT, APP_SRC are used to compute other attributes into seed.config.ts, so we can't edit it properly into project.config !

The consequences: everytime I pull ng2-seed (I do it frequently because I love your work), I have to merge the seed.config file and take care of any changes :(

A solution, as discussed into previous posts, could and should be to wrap all attributes into an init method called from the constructor of project.config.

Something like :

init() {
  // The purpose of init is to look if this.APP_SRC is already set (ex: from project.config). If not, set default value
  this.APP_SRC = (typeof this.APP_SRC === 'undefined') ? `src/${this.APP_CLIENT}` :  this.APP_SRC;

  // repeat for all attributes of seed.config
}

I sincerely hope, it will not be closed until resolved. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions