Open Jakobovski opened 10 years ago
Yeoman generators generally don't have delete options but you're not the first person to ask. I will add it in the future.
What needs to be removed for module removal aside from deleting the included js in index.html and `@import
in the app.less?
the module injection in app.js. Also it would be useful to be able to remove directives, partials and services as well.
On Sun, Jun 22, 2014 at 11:44 AM, jeffreycahyono notifications@github.com wrote:
What needs to be removed for module removal aside from deleting the included js in index.html and @impart https://github.com/impart in the app.less?
— Reply to this email directly or view it on GitHub https://github.com/cgross/generator-cg-angular/issues/35#issuecomment-46785943 .
There's something more to deleting modules than that. I created a module called home, then promptly junked it by deleting the directory, any mods to app.less, index.html, and app.js. I recreated the module, then created a partial. The partial generator asked me to choose from three modules:
❯ myapp (Primary Application Module)
home
home
I've scoured my project looking for any lingering mentions of 'home' and haven't found any.
EDIT: I eventually found them in the file .yo-rc.json. As a short-term aid to deleting things, could the generator be more transparent that .yo-rc.json was modified?
I would love knowing if there's anything to look forward to on this front? I use Yeoman to scaffold my app as I go - this is why it's so useful to me. Refactoring is an essential part of the process and would be much less pain if the generator support deletion.
It would be really useful for there to be a command to be able to remove and rename a partials/modules/directives etc...
For example:
yo cg-angular:module my-module --delete