Skip to content

[Enhancement] Multi Module Projects #1140

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

Closed
galvinograd opened this issue Jun 19, 2016 · 11 comments
Closed

[Enhancement] Multi Module Projects #1140

galvinograd opened this issue Jun 19, 2016 · 11 comments
Labels
feature Issue that requests a new feature P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@galvinograd
Copy link

galvinograd commented Jun 19, 2016

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?

@galvinograd galvinograd changed the title [FEATURE REQUEST] Multi Module Projects [Enhancement] Multi Module Projects Jun 19, 2016
@filipesilva filipesilva added the feature Issue that requests a new feature label Jun 19, 2016
@filipesilva
Copy link
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.

@galvinograd
Copy link
Author

galvinograd commented Jun 20, 2016

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?

@filipesilva
Copy link
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.

@galvinograd
Copy link
Author

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

@filipesilva
Copy link
Contributor

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

@galvinograd
Copy link
Author

Thanks :)

@filipesilva filipesilva added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Jul 28, 2016
@amalieiev
Copy link

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?

@filipesilva
Copy link
Contributor

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

@bryceChernecki
Copy link

bryceChernecki commented Jan 5, 2017

@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

@filipesilva
Copy link
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).

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Issue that requests a new feature P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

4 participants