generator-cg-angular icon indicating copy to clipboard operation
generator-cg-angular copied to clipboard

Introduce option to set the base app directory

Open jloosli opened this issue 10 years ago • 4 comments

This isn't quite the same as #28, but I run various applications with a directory structure that looks like:

config.file
bower.json
composer
otherconfig
Gruntfile.js
etc.
|--public
|--other_library
|--etc.

I'd love to run yo and grunt from the root of the directory, but be able to place all of the bower_components, javascript, and app stuff in the public directory. For now, I can cd to public and run everything, but having that option would be more convenient.

jloosli avatar Jun 12 '14 20:06 jloosli

i would also love this option :+1:

debris avatar Jun 28 '14 10:06 debris

+1

cxq avatar Jul 19 '14 12:07 cxq

You can change your .yo-rc.json to read

"partialDirectory": "public/partial/",
"directiveDirectory": "public/directive/",
"filterDirectory": "public/filter/",
"serviceDirectory": "public/service/",

then change your .bowerrc.json to { "directory" : "public/bower_components" }

then you have to hack into your Gruntfile to add public/ to bower references...

and then finally edit the original index file to add public/ to all references....

OR

When you type "yo cg-angular myApp" you get: [?] Enter directory where you would like to put your application files (i.e. /app/)? If you want all your files in the root directory, leave this empty.

I see your point!

bolora avatar Aug 04 '14 17:08 bolora

I just made a PR #94 to allow for configurable primary application components but did not move bower_components. If this helps your case, please up-vote it.

I am curious, are you wanting to serve directly out of your development directory? The project is already setup to run grunt build and then a 'public' directory called dist is setup that you can safely serve from.

joeljeske avatar Jan 22 '15 04:01 joeljeske