The Ember CLI has a command (ember addon <addon-name>
) that will scaffold a new project designed to be installed via npm into other Ember CLI projects. These "addon" projects can also be built and served standalone using a built-in "dummy app", which acts as a fake consumer of the addon for testing and demonstration purposes. This is extremely useful for quickly creating a styleguide/component library that is shared between business apps but also deployed independently.
I am looking for an equivalent for my Angular CLI projects, and was hopeful the CLI would provide a similar method for creating addons, seeing as it is based on the Ember CLI. Is it possible to consume an Angular CLI app from another Angular CLI app, or will I have to create my own "addon" using a manual (gulp/grunt) build process?
Thanks!
Related to Angular2: Dependencies Between Apps created with angular-cli which is unsolved.
At the time of this writing, angular-cli
does not have a direct equivalent of ember
's addon
. However, as I've written in another answer, "@angular/cli
's commands support multiple applications with the --app
flag. ng serve --app foo
will serve the foo
app, whereas ng serve --app bar
will serve the bar
app. This flag also works with ng build
, ng e2e
, ng eject
, ng test
, and ng xi18n
. To add a new app to your existing $ROOT
directory, use ng new
." The applications may be configured in .angular-cli.json
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With