Skip to content

[Enhancement] Multi Module Projects #1140

Closed

Description

@galvinograd

Hey,

As projects evolve and become larger, multi module architecture become a crucial ability.
I think that incorporating a new code generator for modules would solve this problem.

For example:

ng g module components
ng g module demo-app
ng g module editor-app

npm run start-demo-app
npm run test demo-app
npm run lint components

I saw material2 implements this kind of functionality, and I was able to recreate it by following these steps:

  1. karma-test-shim.js - appPaths is modified to cover all modules
  2. angular-cli-build.js - Angular2App is built and returned based on the environment variable.
  3. multiple tsconfig.ts directories under src/.

What do you think?

Activity

  1. changed the title [-][FEATURE REQUEST] Multi Module Projects[/-] [+][Enhancement] Multi Module Projects[/+] on Jun 19, 2016
  2. added
    featureLabel used to distinguish feature request from other issues
    on Jun 19, 2016
  3. filipesilva commented on Jun 19, 2016

    @filipesilva
    Contributor

    This would be useful, but would also require more changes than you listed. For example, the support for modules would need to be directly integrated into ng serve and ng build.

  4. galvinograd commented on Jun 20, 2016

    @galvinograd
    Author

    Maybe, we could instead introduce a new option for ng new which would create a headless library instead of a full blown app project.

    An example for multi module application creation using the new flag would be:

    ng new comopnents --lib
    ng new components-demo
    ng new myapp
    
    cd myapp && npm install --save file:../components
    cd ../components-demo && npm install --save file:../components
    

    With that approach, only ng build and ng init\new would need to be changed (I think).
    What do you think?

  5. filipesilva commented on Jun 20, 2016

    @filipesilva
    Contributor

    What you just described now is the upcoming lib app support. It's a bit different than what's happening in material 2 though.

  6. galvinograd commented on Jul 3, 2016

    @galvinograd
    Author

    Couldn't find where do you mention the lib app support, when it should be approximately shipped? :)

  7. filipesilva commented on Jul 3, 2016

    @filipesilva
    Contributor

    I don't have a date, but it should be included in 1.0.

  8. galvinograd commented on Jul 6, 2016

    @galvinograd
    Author

    Thanks :)

  9. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Jul 28, 2016
  10. amalieiev commented on Sep 7, 2016

    @amalieiev

    Hi guys,
    As far as I understand this upcoming lib app support will allow developers to generate 3rd party modules, like AngularFire2, which than can be able published to npm registry and installed by other users via npm install command, am I right?
    I currently use 1.0.0-beta.11-webpack.8 angular-cli, but there is no mention about lib generators. Maybe I missed something?

  11. filipesilva commented on Sep 16, 2016

    @filipesilva
    Contributor

    @amalieiev yeap, that's the plan. We don't have any details on it right now, nor is the functionality in any release.

  12. bryceChernecki commented on Jan 5, 2017

    @bryceChernecki

    @filipesilva Do you have an update regarding the lib app support? Is it slatted for any future release yet? :) My team and I would LOVE to have this functionality within the CLI

  13. filipesilva commented on May 22, 2017

    @filipesilva
    Contributor

    Heya, I'm closing this issue since lib support is being tracked in #1692, and there is already multiple app support (https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/multiple-apps.md).

  14. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  15. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions