johnpapa / generator-hottowel

Yo generator that creates an Angular app via HotTowel
835 stars 230 forks source link

Change directory structure in build/ #129

Closed ssbrewster closed 9 years ago

ssbrewster commented 9 years ago

This is a request for help. Where and how can I change the directory structure that gets created in the build folder after running gulp build?

Currently it is

build/
     fonts/
     images/
     js/
     styles/
     index.html

I would like to either change the directory names or create a different structure. Something like:

build/
     myapp/
         fonts/
         images/
         js/
         styles/
     index.html

How is the structure currently created? It looks like gulp-optimize does this. I understand how gulp.dest(config.build) will create the build folder but how are the build subdirectories created?

ssbrewster commented 9 years ago

Ok I got it - it can be done with a combination of modifying the images and fonts task in gulpfiule.js and in index.html where scripts are injected at build e.g.

<!-- build:js somedir/js/app.js -->

or just rename the js directory

some-project-js/app.js

The purpose of doing this was to put proxy rules in place on a proxy server that is proxying to multiple app servers so js/ or styles/ is too generic.