本文整理汇总了TypeScript中gulp-clean-css.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
/**
* Minifies the output .css.
*/
export default function (settings: IGulpSettings): any {
"use strict";
const cssMin = require("gulp-clean-css");
return settings.gulp.src(`${Constants.folders.src}/*.css`)
.pipe(cssMin({
compatibility: "ie10"
}))
.pipe(settings.gulp.dest(Constants.folders.lib));
}
示例2: bundleRelease
function bundleRelease(stream) {
return stream
.pipe(concat('main.css'))
.pipe(applySass())
.pipe(autoprefixer({browsers: settings.autoprefixer}))
.pipe(minify())
.pipe(gulp.dest(helper.getTempFolder() + '/css'));
}
示例3:
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"));
});
示例4: src
task(':build:components:assets:minify', () => {
return src('**/*.+(html|css)', { cwd: DIST_COMPONENTS_ROOT})
.pipe(gulpIf(/.css$/, gulpMinifyCss(), gulpMinifyHtml(HTML_MINIFIER_OPTIONS)))
.pipe(dest(DIST_COMPONENTS_ROOT));
});
示例5:
gulp.task("styles", ["styles_compile"], () => {
return gulp.src("src/assest/css/*.css")
.pipe(cleanCSS())
.pipe(gulp.dest('build/css'));
});
示例6: src
return () => {
return src(join(sourceDir, '**/*.scss'))
.pipe(gulpDartSass.sync().on('error', gulpDartSass.logError))
.pipe(gulpIf(minifyOutput, gulpCleanCss()))
.pipe(dest(outputDir));
};
示例7: buildScssPipeline
export function buildScssPipeline(sourceDir: string, minifyOutput = false) {
return src(join(sourceDir, '**/!(test-).scss'))
.pipe(gulpSass({includePaths: sassIncludePaths}).on('error', gulpSass.logError))
.pipe(gulpIf(minifyOutput, gulpCleanCss()));
}