Ignoring SCSS/SASS partials in Gulp task -
i've got following structure:
├── assets │ └── css │ └── output.css ├── gulpfile.js ├── index.html ├── package.json └── scss ├── some-other.css ├── _base.scss ├── _config.scss ├── _helpers.scss ├── _home.scss └── main.scss
i'm using gulp compile css , scss files in scss/
1 file in assets/css/
. relevant task gulpfile.js
:
gulp.task('build-css', function() { return gulp.src(['scss/**/*.scss','scss/**/*.css']) .pipe(concat('output.css')) .pipe(sass()) .pipe(gulp.dest('assets/css')); });
the problem scss/sass partials (those files starting underscore in scss/
fed through the task , fail.
i'd ignore files anywhere in scss/
start underscore , end .scss
.
i've taken @ following wasn't able work:
it seems mislead , using suggestions in linked questions able working following:
gulp.task('build-css', function() { return gulp.src('scss/**/[^_]*.?(s)css') .pipe(concat('output.css')) .pipe(sass()) .pipe(gulp.dest('assets/css')); });
sorry noise - should have been more thorough in testing before asking question. hope helps someone, though.
Comments
Post a Comment