Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation : convenience script for generators #74

Open
andytango opened this issue Mar 23, 2017 · 2 comments
Open

Automation : convenience script for generators #74

andytango opened this issue Mar 23, 2017 · 2 comments

Comments

@andytango
Copy link

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
Copy link
Owner

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants