本文整理汇总了TypeScript中gulp-better-rollup.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: src
task(':build:components:rollup', () => {
const globals: {[name: string]: string} = {
// Angular dependencies
'@angular/core': 'ng.core',
'@angular/common': 'ng.common',
'@angular/forms': 'ng.forms',
'@angular/http': 'ng.http',
'@angular/platform-browser': 'ng.platformBrowser',
'@angular/platform-browser-dynamic': 'ng.platformBrowserDynamic',
// Rxjs dependencies
'rxjs/Subject': 'Rx',
'rxjs/add/observable/fromEvent': 'Rx.Observable',
'rxjs/add/observable/forkJoin': 'Rx.Observable',
'rxjs/add/observable/of': 'Rx.Observable',
'rxjs/add/observable/merge': 'Rx.Observable',
'rxjs/add/observable/throw': 'Rx.Observable',
'rxjs/add/operator/auditTime': 'Rx.Observable.prototype',
'rxjs/add/operator/toPromise': 'Rx.Observable.prototype',
'rxjs/add/operator/map': 'Rx.Observable.prototype',
'rxjs/add/operator/filter': 'Rx.Observable.prototype',
'rxjs/add/operator/do': 'Rx.Observable.prototype',
'rxjs/add/operator/share': 'Rx.Observable.prototype',
'rxjs/add/operator/finally': 'Rx.Observable.prototype',
'rxjs/add/operator/catch': 'Rx.Observable.prototype',
'rxjs/add/operator/first': 'Rx.Observable.prototype',
'rxjs/add/operator/startWith': 'Rx.Observable.prototype',
'rxjs/add/operator/switchMap': 'Rx.Observable.prototype',
'rxjs/Observable': 'Rx'
};
const rollupOptions = {
context: 'this',
external: Object.keys(globals)
};
const rollupGenerateOptions = {
// Keep the moduleId empty because we don't want to force developers to a specific moduleId.
moduleId: '',
moduleName: 'ng.material',
format: 'umd',
globals,
banner: LICENSE_BANNER,
dest: 'material.umd.js'
};
return src(path.join(DIST_COMPONENTS_ROOT, 'index.js'))
.pipe(gulpRollup(rollupOptions, rollupGenerateOptions))
.pipe(dest(path.join(DIST_COMPONENTS_ROOT, 'bundles')));
});
示例2: createRollupBundle
/** Creates a rollup bundles of the ng2-smart-table components.*/
function createRollupBundle(format: string, outFile: string) {
const rollupOptions = {
context: 'this',
external: Object.keys(ROLLUP_GLOBALS),
};
const rollupGenerateOptions = {
// Keep the moduleId empty because we don't want to force developers to a specific moduleId.
moduleId: '',
moduleName: 'ng2-smart-table',
banner: TABLE_LICENSE_BANNER,
format: format,
dest: outFile,
globals: ROLLUP_GLOBALS,
};
return gulpRollup(rollupOptions, rollupGenerateOptions);
}