generator-react-webpack-redux icon indicating copy to clipboard operation
generator-react-webpack-redux copied to clipboard

Automation : convenience script for generators

Open andytango opened this issue 7 years ago • 2 comments

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!

andytango avatar Mar 23 '17 08:03 andytango

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?

stylesuxx avatar Mar 23 '17 10:03 stylesuxx

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

andytango avatar Mar 23 '17 15:03 andytango