rocjs / roc

🐦 Modern JavaScript Development Ecosystem
MIT License
425 stars 23 forks source link

Add "nuke" post-install command #131

Open pierluigi opened 8 years ago

pierluigi commented 8 years ago

Hi all and thanks for sharing Roc – it's pretty awesome.

I wonder if it would make sense to allow packages to define a "nuke" option in order to remove any boilerplate code from the project. For example, after roc init web-app-react I'd like a simple way to kick out all the components, routes, etc so I can start fresh.

Granted this is not a lot of manual work, but it'd make things easier for sure!

andreasrs commented 8 years ago

Hey!

Interesting idea about providing a command to do this. Will add that to the list of considerations for when we take a look at the templating power next.

Just FYI, right now there is nothing stopping you from forking https://github.com/rocjs/roc-template-web-app-react - where you delete these things or set it up exactly how you like.

You could then run roc init pierlo-upitup/roc-template-web-app-react and it will use this as your starting point instead. (web-app-react is just a built-in alias to rocjs/roc-template-web-app-react on github).

This will give you the exact power that you need in the meantime.

pierluigi commented 8 years ago

Thanks!

dlmr commented 8 years ago

While I like the idea of a nuke command I think one of the following two options would be better given the latest version of core that is now available from @next.

  1. Remove some of the boilerplate code that is created from the template. I believe that it is a bit on the heavy side at the moment.
  2. Use the new template system that we have in roc@1.0.0-rc.11. Using it we can ask the user during setup if we should generate the boilerplate or just do the minimal needed setup.

And of course as @andreasrs said above, it is always to fork and host a custom template that can be used. However we should try to make the official templates work for most people to avoid fragmentation.

androa commented 8 years ago

The boilerplate/template code should preferably be changed to something leaner, and resemble a more real life usecase so it's easier to adapt. IMO it should also include API requests.

On Mon, 26 Sep 2016, 21:31 Gustaf Dalemar, notifications@github.com wrote:

While I like the idea of a nuke command I think one of the following two options would be better given the latest version of core that is now available from @next.

1.

Remove some of the boilerplate code that is created from the template. I believe that it is a bit on the heavy side at the moment. 2.

Use the new template system that we have in roc@1.0.0-rc.11. Using it we can ask the user during setup if we should generate the boilerplate or just do the minimal needed setup.

And of course as @andreasrs https://github.com/andreasrs said above, it is always to fork and host a custom template that can be used. However we should try to make the official templates work for most people to avoid fragmentation.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rocjs/roc/issues/131#issuecomment-249672759, or mute the thread https://github.com/notifications/unsubscribe-auth/AAj5DhWzGlQqOmC1HFUNfixOGwWJguCWks5quB2SgaJpZM4KGfcZ .