zewa666 / generator-aurelia

Yeoman generator for the JavaScript Framework Aurelia
77 stars 18 forks source link

all skeleton directories made when only one was chosen #25

Closed mika76 closed 8 years ago

mika76 commented 8 years ago

Maybe I'm misunderstanding how this should work, but when you run yo aurelia it says

? Which Aurelia preset would you like to install? (Use arrow keys)
❯ EcmaScript 2016 
  ASP.NET 5 - EcmaScript 2016 
  TypeScript 
  ASP.NET 5 - TypeScript 

so let's say you choose the first one, after a bunch of time it finished working, but then the folder looks like:

$ ls
CONTRIBUTING.md              skeleton-es2016-asp.net5
LICENSE                      skeleton-typescript
README.md                    skeleton-typescript-asp.net5
skeleton-es2016

Shouldn't it only place the skeleton-es2016 folder? and should there even BE a folder?

zewa666 commented 8 years ago

well this generator essentially just pulls the full skeleton-navigation repo, enters your selected version and runs jspm + npm installs.

So yes the behavior is intended.

mika76 commented 8 years ago

Fair enough :smile: but then what is the point of the selection?

zewa666 commented 8 years ago

the point is that it does do the npm and jspm install for exactly that one subfolder you've selected.

mika76 commented 8 years ago

Yes I see - I made a fork and am playing with it. I see the main problem is trying to download a child folder from a git repo, so I'm playing around with downloading into a temp folder and then just copying the one you want.

I see from https://github.com/jprichardson/node-github-download/issues/11 you were asking about this issue a while back - was it about the same problem?

If I manage to make it work are you interested in a pull request?

zewa666 commented 8 years ago

@mika76 absolutely. We could add another command line option and/or ask the user when starting yo what he'd prefer, install the selected subfolder into the current folder or do as it is right now.

mika76 commented 8 years ago

Added pull request #26 - I'm not yet that versed in yeoman generators so I'm not sure how to do the choice part...

zewa666 commented 8 years ago

After thinking more about the choice part, I realized that your option should be the default and may result in a much better use case coverage then having all skellys downloaded, so its promoted as standard. I've fixed parts of your commit and merged it. Thank you very much for the contribution :+1:

mika76 commented 8 years ago

Cool, no problem, glad I could help and thanks for fixing that glaring path issue :smile: