Hacker Newsnew | past | comments | ask | show | jobs | submit | gracehaz's commentslogin

This can be easily done by creating a npm script "generact path/to/boilerplate/component.js" and just running `npm run generact`.

The difference though is that you'll still be prompted for component path and name, but I'd gladly accept a PR adding options to CLI (maybe --path, --name?) to skip that part.


I'd done that too. But I found some problems with that approach:

- you can't automatically create files (AFAIK);

- it doesn't help your team mates, only works for you and with that specific editor;

- if you start working on a different project with different standard, you'll need to update the snippets or create new ones.

Turned out that I was always copying and pasting, so I decided to create this tool.


True points, very cool tool though and thanks for sharing.


Kinda, but not really. XD

It copies files, renames them and replaces their names in the contents.


Components relying on <State context> will be re-rendered with new state.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: