Reputation: 9668
I've set up gulp and sass file compiler. Below is the contents of the gulpfile.js:
const sass = require('gulp-sass');
gulp.task('sass', function() {
gulp.src('src/assets/scss/**/*')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('src/assets/css'))
});
My folder structure is:
src/
assets/
scss/
theme.scss <!-- main file -->
components/
_.scss <!-- extra files -->
What I want is to basically compile theme.scss into theme.css. However, I also get the /components
folder copied inside the src/assets/css
folder (though empty). Why is this happening?
Upvotes: 0
Views: 146
Reputation: 2269
I suspect gulp.src('src/assets/scss/**/*')
might be the issue.
Try changing this to gulp.src('src/assets/scss/**/*.scss')
Upvotes: 1