本文整理匯總了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()));
}