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

renaming the project #85

Closed
yonatanmn opened this issue Apr 8, 2015 · 15 comments
Closed

renaming the project #85

yonatanmn opened this issue Apr 8, 2015 · 15 comments

Comments

@yonatanmn
Copy link
Contributor

For every operation, one needs to write yo react-webpack, quite long I assume.
There is no workaround for alias name, so the only option is to rename the entire project.

generator-react is already taken. Can anyone think about a cool and short name?

@ColCh
Copy link
Contributor

ColCh commented Apr 11, 2015

You can use your shell feature named alias

I wrote small example for you:

alias yorw="yo react-webpack"

You can make this permanent with adding that line to your ~/.bashrc.

@newtriks
Copy link
Member

That's the exact route I was thinking after realising this was out of scope for yeoman  👍 thanks Max

On Saturday, 11 Apr 2015 at 16:45, Max Sysoev notifications@github.com, wrote:

You can use your shell feature named alias

I wrote small example for you:

export yorw="yo react-webpack"

You can make this permanent with adding that line to your ~/.bashrc.


Reply to this email directly or view it on GitHub.

@yonatanmn
Copy link
Contributor Author

I disagree with this solution.
First, bash is a unix thing, not everyone uses it.
Second, this is a hack, not a normal way. the all point of yeoman is make life shorter, and this long name might prevent potential users from using this generator.
lastly - webpack is one feature of this generator, but not its main core. I believe this will be the ultimate generator for react, similar to generator-angular, so the name should represent that.

@newtriks newtriks reopened this Apr 12, 2015
@semigroupoid
Copy link

Sorry, I disagree with that. Using aliases for abbreviations is not a hack, its one of their main use cases. I don't know if you use Windows (because of your "unix thing" comment) but I bet that the Windows command line tools have some way of defining aliases, too. Abbreviations and such are a very subjective thing, similar to keyboard shortcuts and as such should be handled in your terminal configuration and not by renaming the project. (There is also a zsh plugin that gives you auto-completion of generator names.)
Regarding your last point, I think webpack is an essential part of this project and one that seperates this generator from others. Also, the name generator-react is not much shorter than generator-react-webpack, is it?

@yonatanmn
Copy link
Contributor Author

Iv'e tried with windows, so instead of react-webpack i'll do
rw but then you cannot do rw:component. any way - this is a hack, in the manner that the point of yeoman generators is to make your life easy and short, without adding anything around . like we have react-webpack:c instead of react-webpack:component.
Webpack is not an essential part, because the user who uses this generator wants React mainly, and will be glad to have webpack (or browerify or whatever) too, but that's not why he came.
Currently this generator is the most popular one for react, and should have a sterile name - so it can remain in the top. similar to generator-angular.
and it's not generator-react in the console - only react, which is less than a half of react-webpack.

@ColCh
Copy link
Contributor

ColCh commented May 17, 2015

@yonatanmn sorry I've forgot about subgenerators. Hm.. this is a hard issue...
I'm sure that renaming the project is not a solution.

Ha! What about npm scopes? With 'em it's possible to place this generator like @newtricks/generator-react

@yonatanmn
Copy link
Contributor Author

The problem is with how Yeoman will read this, stating it is only looking for generator-XXX, any way if this is the only issue, we can use generator-react, since https://github.com/nemophrost/generator-react is not alive, and we can ask the owner to drop it, or alternatively think of a cool and short name

@semigroupoid
Copy link

Honestly, I still don't see the point. If subgenerators don't work, use alias rwc="yo react-webpack:c" etc. Again, shell aliases are not a hack. They are primarily used for abbreviations!
In my opinion, the usage of webpack makes this generator to opinionated for a generic name such as generator-react.

@yonatanmn
Copy link
Contributor Author

In windows, tried : doskey r:c=yo react-webpack:c, and then r:c test.
result:
Error: Did not provide required argument ←[1mname←[22m!
I think doskey can't get more code after the alias.

@semigroupoid
Copy link

I don't have a Windows machine, but did you try doskey r:c="yo react-webpack:c"? You probably have to wrap the actual command in quotes (you also have to do that in bash).

@yonatanmn
Copy link
Contributor Author

the correct way is what i quoted before (that's why it gave 'no name' error). Tried yours just to make sure - not working at all.
(can you verify r:c test works in mac?)

@semigroupoid
Copy link

Yes r:c test works. First:

alias r:c="yo react-webpack:c"

Then you can do:

r:c test
   create src/components/Test.js
   create test/spec/components/Test.js
   create src/styles/Test.css

@yonatanmn
Copy link
Contributor Author

Ok, but still no windows solution...

@semigroupoid
Copy link

What about cygwin or PowerShell?

@yonatanmn
Copy link
Contributor Author

I'll check them out.
any way I still in my opinion that the project should be renamed :)

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

5 participants