@artprog/gulp-sass-glob
v0.1.1
Published
Gulp task to allow importing glob-pattern directories in your SCSS
Downloads
9
Readme
@artprog/gulp-sass-glob
gulp task to allow importing directories in your SCSS.
Different from gulp-sass-glob-import: it allows to pass glob options by config.
installation
npm install --save-dev @artprog/gulp-sass-glob
usage
in your .scss file
@import "some/path/**/*.scss";
in your gulpfile
const
gulp = require('gulp'),
sass = require('gulp-sass')(require('sass')),
sassGlob = require('@artprog/gulp-sass-glob');
const compileSass = () => {
return gulp.src([
'./path/to/your/scss-folder/**/*.scss',
'!./path/to/your/scss-folder/**/_*.scss'
])
.pipe(sassGlob({
nosort: true //<-- we may pass glob parameters
}))
.pipe(sass())
.pipe(gulp.dest('./path/to/your/css-folder/'));
}
gulp.task('sass', compileSass);