Skip to content
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

Ionic Generate Application within existing Application #50

Open
ari62 opened this issue Dec 22, 2018 · 2 comments
Open

Ionic Generate Application within existing Application #50

ari62 opened this issue Dec 22, 2018 · 2 comments

Comments

@ari62
Copy link

ari62 commented Dec 22, 2018

Feature Request

Ionic version:

[x] 4.x

Describe the Feature Request

Please provide the ability to generate a workspace and new libraries and applications within the workspace. I am asking for capabilities equal to "ng generate application", "ng new", and "ng generate library". This would allow people to generate a workspace and multiple projects within the workspace, and shared libraries.
Currently when "ng generate application" is run within an app created with "ionic start" an error is given:

Schematic "e2e" not found in collection "@ionic/angular-toolkit".

No error is given when "ng generate library" is used within an ionic app and code is generated in the "projects" directory, though I am unsure if the code is correct and useful.

Describe Preferred Solution

Either allow "ng generate application" and "ng generate library" to work within an ionic project or create new commands to generate a workspace, library, and sub-application from the ionic cli.

Additional Context

Related issue: ionic-team/ionic-cli#3087
Reference:
https://angular.io/cli/new
https://angular.io/cli/generate
https://angular.io/guide/file-structure#project-folders-for-additional-apps-and-libraries

@imhoffd imhoffd transferred this issue from ionic-team/ionic-cli Dec 22, 2018
imhoffd added a commit that referenced this issue Jan 4, 2019
@imhoffd
Copy link
Contributor

imhoffd commented Jan 4, 2019

@ari62 There are a number of issues here. I just pushed a commit that will clear up the Schematic "e2e" not found error. It will now generate an Angular application within projects/. As you can see from our collection.json, we use the Angular schematics for everything aside from page, which we've added. So using ionic g app will yield an Angular app, not an Ionic Angular app.

More generally, the desire to use monorepos to organize Ionic apps and supporting code is relatively new. We're still working on how to best support it. Right now, using a multi-app project setup, the Ionic CLI can operate on multiple apps within a monorepo (ionic-team/ionic-cli#3281), but the Angular setup must be done manually and we don't have a concise answer for how best to accomplish this. I think the best solution may be to extend the schematics for application and library and sprinkle Ionic stuff on top.

@ari62
Copy link
Author

ari62 commented Jan 6, 2019

Thanks dwieeb. I hadn't seen the multi-app projects document link, thanks for sharing it. It would be great if the document was expanded with an example of creating a shared library (a library written from scratch I mean, not an npm installed library) and an example of sharing the node_modules directory, or a portion of it, and npm installing into it. Feel free to move this feature request to the documentation project, or close it if the documentation isn't on github, or whatever you prefer.

wand1252 added a commit to wand1252/angular-toolkit-develop that referenced this issue Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants