在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):mikevercoelen/gulp-sass-glob开源软件地址(OpenSource Url):https://github.com/mikevercoelen/gulp-sass-glob开源编程语言(OpenSource Language):JavaScript 93.1%开源软件介绍(OpenSource Introduction):gulp-sass-globGulp plugin for gulp-sass to use glob imports. Install
Basic Usagemain.scss @import "vars/**/*.scss";
@import "mixins/**/*.scss";
@import "generic/**/*.scss";
@import "../components/**/*.scss";
@import "../views/**/*.scss";
@import "../views/**/*something.scss";
@import "../views/**/all.scss"; NOTE: Also support using gulpfile.js var gulp = require('gulp');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');
gulp.task('styles', function () {
return gulp
.src('src/styles/main.scss')
.pipe(sassGlob())
.pipe(sass())
.pipe(gulp.dest('dist/styles'));
}); Ignoring files and directories by patternYou can optionally provide an array of paths to be ignored. Any files and directories that match any of these glob patterns are skipped.
TroubleshootingNested glob imports
main.scss @import 'blocks/**/*.scss'; blocks/index.scss @import 'other/blocks/**/*.scss'; This will throw an error, because Solving nested glob importsYou have to think diffrent about your
Problem solved. Thanks and love
ContributeRun tests
Build dist
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论