本文整理匯總了TypeScript中gulp-plumber.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了default函數的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: buildXML
export function buildXML() {
let convertToXMLObj = (icon: IconInfo): IconXML => {
return {
'@id': icon.name,
'unicode': {
'#text': icon.unicode
}
};
};
let xmlObj = {
style: {
solid: {
icon: JSONSource.solid.map(convertToXMLObj)
},
regular: {
icon: JSONSource.regular.map(convertToXMLObj)
},
brands: {
icon: JSONSource.brands.map(convertToXMLObj)
}
}
};
let xmlStr = xmlBuilder.create(xmlObj, { version: '1.0', encoding: 'UTF-8' })
.end({
pretty: true,
indent: '\t'
});
return createStream(`${filename}.xml`, xmlStr)
.pipe(plumber())
.pipe(gulp.dest('character-list'));
}
示例2:
gulp.task("jasmine", () => {
gulp.src("./spec/**/*.ts")
.pipe(plumber({errorHandler: notify.onError(buildErrorMessage)}))
.pipe(ts(tsProject))
.pipe(jasmine());
});
示例3: createStream
export async function buildTOML() {
const iconSource: ExtendibleIconSource = await getSource();
return createStream('character-list.toml', TOML.stringify(iconSource))
.pipe(plumber())
.pipe(dest('character-list'));
}
示例4:
gulp.task('js', () => {
gulp.src('./**/*.js')
.pipe(plumber({
errorHandler: onError
}))
.pipe(connect.reload());
});
示例5:
gulp.task('pcss:build', () => gulp.src(env.path.src.css)
.pipe(plumber())
.pipe(postcss(postCssPlugins))
.pipe(rename({
extname: '.css',
}))
.pipe(gulp.dest(`${env.dir.src}/app`)));
示例6: buildYAML
export function buildYAML() {
let yamlStr = '---\n';
yamlStr += yaml.safeDump(JSONSource);
return createStream(`${filename}.yaml`, yamlStr)
.pipe(plumber())
.pipe(gulp.dest('character-list'));
}
示例7: nib
gulp.task('stylus', () => {
return gulp.src('./app/app.styl')
.pipe(plumber())
.pipe(stylus({
use: [axis(), nib()],
import: process.cwd() + '/bower_components/material-colors/dist/colors.styl'
}))
.pipe(gulp.dest(release ? RELEASE_DIR : BUILD_DIR))
});