infinitered / ignite

Infinite Red's battle-tested React Native project boilerplate, along with a CLI, component/model generators, and more! 9 years of continuous development and counting.
MIT License
17.7k stars 1.4k forks source link

Add a `destroy` command #1208

Open wisn opened 6 years ago

wisn commented 6 years ago

Ignite have a generate command which is producing an example file from plugin. The missing command is destroy which is remove a file that generated by the plugin. Not only add a new command, this will need to change the plugin behavior as well.

$ ignite g saga hello
✔︎ App/Sagas/HelloSagas.js
✔︎ Tests/Sagas/HelloSagaTest.js
$ ignite d saga hello
✘ App/Sagas/HelloSagas.js
✘ Tests/Sagas/HelloSagaTest.js
kevinvangelder commented 6 years ago

We have remove for plugins but haven't yet built a way to remove generated files as it's usually easy enough to do it manually, but it's a good suggestion! 👍

adrianhartanto0 commented 5 years ago

Should this be boilerplate specific command since each boilerplate has its own file structure? @jamonholmgren

jamonholmgren commented 5 years ago

@adrianhartanto0 Yeah, you'd just copy and paste the generate folder and make a destroy folder (and commands/destroy/destroy.js).

https://github.com/infinitered/ignite-bowser/tree/d0cae5484a96f4d686ab61c87428ec5749b194d6/commands

I'd wait a bit, though, as we're revamping that folder structure a bit right now.

frankcalise commented 1 year ago

Closing since Ignite does not contain plugins anymore

jamonholmgren commented 1 year ago

This would actually also apply to generators, which we do still have @frankcalise. (Honestly -- not very hard to implement either!)

frankcalise commented 1 year ago

@jamonholmgren so this would remove a model/screen/component that was once generated?