Currently, I am in the process of creating a standardized framework that can be utilized across multiple projects. My main objective is to gain familiarity with gulp/npm and project building techniques.
I aim to maintain a clear separation of distinct components and use gulp tasks to compile files from each component folder efficiently.
More specifically...
My preference is to employ the following globs:
app/components/**/scripts/**/*.js
app/components/**/*.css
Here are some sample files:
app/components/about/file1.css
app/components/about/file2.css
app/components/about/scripts/file1.js
app/components/about/scripts/file1.js
app/components/home/file1.css
app/components/home/file2.css
app/components/home/scripts/file1.js
app/components/home/scripts/file1.js
In order to merge these files into the following outputs:
app/components/about/scripts.js
app/components/home/scripts.js
app/assets/css/components/about_styles.css
app/assets/css/components/home_styles.css
I came across this recipe which seems to achieve what I have in mind, but it appears quite cumbersome.
Does anyone know if this can be accomplished using gulp? If not, are there any modules available that could assist in achieving this functionality?