generator-cg-angular icon indicating copy to clipboard operation
generator-cg-angular copied to clipboard

Remove/Rename -- Feature Request

Open Jakobovski opened this issue 10 years ago • 5 comments

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

Jakobovski avatar Jun 05 '14 15:06 Jakobovski

Yeoman generators generally don't have delete options but you're not the first person to ask. I will add it in the future.

cgross avatar Jun 05 '14 23:06 cgross

What needs to be removed for module removal aside from deleting the included js in index.html and ``@import` in the app.less?

jeffreycahyono avatar Jun 22 '14 16:06 jeffreycahyono

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 [email protected] 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 .

Jakobovski avatar Jun 22 '14 16:06 Jakobovski

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?

spamguy avatar Sep 28 '14 13:09 spamguy

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.

SimpleAnecdote avatar Apr 10 '15 15:04 SimpleAnecdote