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