本文整理汇总了TypeScript中gulp-sass.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
/**
* Compiles source .scss files in-place.
*/
export default function (settings: IGulpSettings): any {
"use strict";
const scss = require("gulp-sass");
return settings.gulp.src(`${Constants.folders.src}/*.scss`)
.pipe(scss().on("error", scss.logError))
.pipe(settings.gulp.dest(Constants.folders.src));
}
示例2: function
gulp.task('sass', ["resources"], function () {
gulp.src(['src/**/*.scss', '!node_modules/**/*.*'])
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(function(file) {
return file.base;
}));
});
示例3: function
gulp.task(TASK_STYLES, function() {
console.log('Compiling Site SASS files...');
gulp.src(sassSourceFolder)
.pipe(gulpSass().on('error', gulpSass.logError))
.pipe(gulp.dest(cssDestFolder)
);
});
示例4:
gulp.task("styles", () => {
return gulp.src("src/**/*.scss")
.pipe(sourcemaps.init())
.pipe(sass().on('error', sass.logError))
.pipe(sourcemaps.write())
.pipe(gulp.dest("build"));
});
示例5: compileStyles
/************************************************************
*
*
* STYLES
*
*
***********************************************************/
public compileStyles(destPath: string, bundleFilename: string,
filesInBundle: string[], onCompileDone) {
var self = this;
this.terminal.echoArray("Compiling StyleSheets", filesInBundle);
this.terminal.echoInfo("Output Path Path \"" + destPath + "\"");
var dateString = new Date().toString();
var dnaStamp = "/* PackMan DNA | " + dateString + "*/\n";
var stream: any;
if (Global.Settings.useSourceMaps) {
var stream = gulp.src(filesInBundle)
.pipe(taskSourceMaps.init())
.pipe(taskSass().on('error', function(error) {
console.log("SASS Compilation error", error.message);
}))
.pipe(taskMinifyCss())
.pipe(taskConcat(bundleFilename))
.pipe(taskSourceMaps.write())
.pipe(taskInsert.prepend(dnaStamp))
.pipe(gulp.dest(destPath));
}
stream.on('end', function() {
onCompileDone();
self.terminal.echoPrefixedCyan("** Style Build done", path.join(destPath, bundleFilename));
});
}
示例6: parseThemes
function parseThemes() {
exec('prsr -g typedoc -f angular -i docs/docs.json -o docs/output.json');
return src('docs/themes.scss')
.pipe(sass({
functions: exportThemes('docs/', ''),
}));
}
示例7: csso
() => {
return gulp.src(stylesSource)
.pipe(sass())
.pipe(gulpif(minify, csso()))
.pipe(gulp.dest(DEST_DIR));
}
示例8: function
gulp.task('sass', ["resources"], function () {
gulp.src(['src/**/*.scss', '!node_modules/**/*.*'])
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(function(file) {
return file.base.replace("src/main/resources/UI/src", "target/classes/public");
}));
});
示例9: function
gulp.task('scss', function () {
return gulp.src(PROJECT_PATTERNS.scss)
.pipe(sourcemaps.init())
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
.pipe(autoprefixer('last 2 version'))
.pipe(sourcemaps.write('/maps'))
.pipe(gulp.dest(PROJECT_PATH.css))
.pipe(browserSync.stream({ match: '**/*.css' }));
});
示例10:
export = gulp.task('production:styles', () => {
return gulp
.src(paths.sources.styles)
.pipe(sass())
.pipe(autoprefixer(config.autoprefixer))
.pipe(nano(config.nano))
.pipe(gulp.dest(paths.output.styles))
.on('error', errors)
.pipe(browsersync.stream());
});