I am trying to integrate gulp into my current workflow and website. I'm running into a problem because the folder structure is complex. For example:
-dev
index.html
-images/
-lib/
-js/
-scss/
-app1/
index.html
-images/
-lib/
-js/
-app2/
index.html
-images/
-lib/
-js/
-app3/
index.html
-images/
-lib/
-js/
Each app has its own html and images, and the root /dev does too. It is structured this way for organization and because each app is unique but they share vendor and global" files in /dev/lib/js and all the css files come from /dev/lib/scss.
The output to a dist/ folder should be:
-dist
index.html
-images/
-js/ (from /dev/lib/js)
global.min.js (concat/uglify/rename)
-css/ (from /dev/lib/scss)
-app1/
index.html
-images/
-js/
app1.min.js (concat/uglify/rename all files from /dev/app1/lib/js)
-app2/
index.html
-images/
-js/
app2.min.js (concat/uglify/rename all files from /dev/app2/lib/js)
-app3/
index.html
-images/
-js/
app3.min.js (concat/uglify/rename all files from /dev/app3/lib/js)
So basically, the lib/JS files in each app get processed (concat/uglify/rename) and put into the same structure on dist, but in a js/ folder instead. So...(/dev/app1/lib/js > /dist/app1/js). Also, the root lib files do the same. So...(/dev/lib/js > /dist/js). Also, the scss files in /dev/lib/scss should go to /dist/css.
I've done a lot of searching, but I haven't had any luck finding anything related to this. Some examples, but just not helpful enough to get this right.
On top of all that, I want to make sure I copy any new images and HTML into their respective app structure as well.
Any help would be amazing, thanks everyone!