thardy / generator-ngbp

Yeoman generator based on the ngBoilerplate kickstarter, a best-practice boilerplate for any scale Angular project built on a highly modular, folder-by-feature structure.
100 stars 23 forks source link

Question: Project Root Directory #10

Open william-e-schroeder opened 10 years ago

william-e-schroeder commented 10 years ago

Why Not Create the Project Root Directory, since you are asking for it on the command line? Or, if the developer is creating the directory and moving in to the directory to run the generator, why not extract it from the path?

Just a question. I love the generator!

william-e-schroeder commented 10 years ago

I actually have some code locally for this. If you are interested, I can get all set up and make a pull request.

thardy commented 10 years ago

I guess the reason why I didn't think to extract the directory name from the path and use it for the app name is because I've had SPA apps where the SPA itself was part of a bigger whole, with multiple folders, etc. Maybe the app itself shouldn't be named according to its directory. Sometimes I have mine sit in a "client" folder that's a peer to an "api" folder, or something like that.

I appreciate your work on and with the generator. I just don't know if this would restrict its usage in the scenarios described above.

thardy commented 10 years ago

After thinking about it, how about we still ask what they want to name the app, but we default it to the containing directory? I think that would be good. If you want to submit a pull request for that, I'd be glad to accept it.