stylesuxx / generator-react-webpack-redux

React Webpack Generator including Redux support
Other
552 stars 84 forks source link

Automation : convenience script for generators #74

Open andytango opened 7 years ago

andytango commented 7 years ago

Hey @stylesuxx

Fantastic generator, great work!

One (small) thing I've found using developing with this is that when I run the sub-generators, I have to copy/paste their names from readme, which always feel like a bit of a hassle. So I made a simple shell script like this:

#!/usr/bin/env bash

yo react-webpack-redux:$1  $@:2

First argument is the generator name, rest are passed through.

I wonder though if this something that could be achieved with npm? So you could have something like

npm run action action_name
npm run container container_name
npm run reducer reducer_name

Happy to submit a PR if this has affected anyone else!

stylesuxx commented 7 years ago

Hey @andytango , interesting idea. Technically it should be possible to add those npm actions. But to be honest, I am not sure if I want to do this. That way I am abstracting away the usage of yo, but I want the user to know, that he is using yo in case he wants to pass own args.

However - aliasing is of course a good idea, maybe this could be added in form of a wiki article and linked from the Readme.

What do you think?

andytango commented 7 years ago

@stylesuxx Sure, so provide instructions and examples on how to do this that people could paste into their package.json if they wish?