I have a project with multiple folders that contain sass files:
|── src
└── scripts
└── app1
└── sass
└── base.scss
└── app2
└── sass
└── base.scss
I also have a gulp task that compiles those .scss
files using gulp-sass
and gulp-concat-css
:
gulp.task('build:sass', () =>
gulp.src([
'scripts/**/*.scss'
])
.pipe(plugins.sass().on('error', plugins.sass.logError))
.pipe(plugins.concatCss('bundle.css'))
.pipe(gulp.dest('dist'))
);
Right now, the above task just creates bundle.css
into the dist
folder:
|── dist
└── bundle.css
What I'd like to have happen is this, where the initial folder structure is preserved, except for the sass
folder is now css
.
|── dist
└── scripts
└── app1
└── css
└── bundle.css
└── app2
└── css
└── bundle.css