本文整理汇总了TypeScript中gulp-sass类的典型用法代码示例。如果您正苦于以下问题:TypeScript gulp-sass类的具体用法?TypeScript gulp-sass怎么用?TypeScript gulp-sass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了gulp-sass类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
gulp.task('css.build', () =>
gulp.src(PATH.src.css)
.pipe(sass().on('error', sass.logError))
.pipe(autoPrefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(gulp.dest(PATH.dest.app.client))
示例2:
export = () => {
gulp.src(Config.src.scss)
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(cssmin())
.pipe(sourcemaps.write())
.pipe(gulp.dest(Config.dist.dev));
};
示例3: buildStyles
export default function buildStyles() {
return gulp.src(project.paths.styles)
.pipe(changed(project.paths.output, {extension: '.css'}))
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(gulp.dest(project.paths.output));
};
示例4:
export = () => {
return gulp.src([APP_SRC + '/**/*.scss', '!' + APP_SRC + '/styles/**/_assets.scss'])
// .pipe(sassLint())
// .pipe(sassLint.format())
// .pipe(sassLint.failOnError())
.pipe(sass())
.pipe(gulp.dest(APP_SRC + '/'));
};
示例5:
gulp.task("sass", () => {
gulp.src(Paths.StylesSrc)
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(cleanCss())
.pipe(sourcemaps.write())
.pipe(gulp.dest(Paths.StylesDist))
.pipe(connect.reload());
});
示例6:
gulp.task(task, () => {
let result = gulp
.src(path.join(root, project.plugin.src, '**/*.{scss,css}'))
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write());
for (const moduleName in project.plugin.outputs) {
result = result
.pipe(gulp.dest(path.join(project.plugin.output, moduleName)));
}
return result;
});
示例7: processCSS
export default function processCSS() {
let processors = [
autoprefixer({browsers: ['last 1 version']}),
cssnano
];
return gulp.src(project.cssProcessor.source)
.pipe(changedInPlace({firstPass:true}))
.pipe(sourcemaps.init())
.pipe(postcss(processors))
.pipe(sass().on('error', sass.logError))
.pipe(build.bundle());
};
示例8:
gulp.task("build.css", ["build.css.dev"], (done: any) => {
return gulp.src(["src/themes/*.scss"])
.pipe(sourcemaps.init())
.pipe(sass({
includePaths: ["src/**/*.scss"],
}))
.pipe(autoprefixer({
browsers: ["last 2 versions"],
cascade: false
}))
.pipe(cleanCSS())
.pipe(sourcemaps.write())
.pipe(gulp.dest("./dist"));
});
示例9:
gulp.task("build.css.dev", () => {
gulp.src(["src/themes/*.scss"])
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(sass({
includePaths: ["src/**/*.scss"],
}))
.pipe(autoprefixer({
browsers: ["last 2 versions"],
cascade: false
}))
.pipe(sourcemaps.write("./"))
.pipe(plumber.stop())
.pipe(gulp.dest("./dist/dev"))
});