本文整理汇总了TypeScript中systemjs-builder.buildStatic函数的典型用法代码示例。如果您正苦于以下问题:TypeScript buildStatic函数的具体用法?TypeScript buildStatic怎么用?TypeScript buildStatic使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了buildStatic函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: Builder
gulp.task('!bundle', ['!build:system'], () => {
var builder = new Builder();
builder.config({
map: {
'worker': 'dist/src',
'@angular': 'node_modules/@angular',
'rxjs': 'node_modules/rxjs',
'reflect-metadata': 'node_modules/reflect-metadata/temp/Reflect.js',
'jshashes': 'node_modules/jshashes/hashes.js'
},
packages: {
'worker': {
defaultExtension: 'js'
},
'rxjs': {
defaultExtension: 'js'
},
'@angular/core': {
defaultExtension: 'js',
main: 'index.js'
},
'reflect-metadata': {
format: 'global'
}
}
});
builder.buildStatic('worker/browser_entry', 'dist/worker.js');
});
示例2:
.then(function() {
let outputFile = './public/bundle.min.js';
return builder.buildStatic('app', outputFile, {
minify: true,
mangle: true,
rollup: true
});
})
示例3: Builder
export = (done: any) => {
let builder = new Builder(SYSTEM_BUILDER_CONFIG);
builder
.buildStatic(join(TMP_DIR, BOOTSTRAP_MODULE),
join(JS_DEST, JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done());
};
示例4: Builder
export = (done: any) => {
let builder = new Builder(SYSTEM_BUILDER_CONFIG);
builder
.buildStatic(`${TMP_DIR}/${BOOTSTRAP_MODULE}`,
join(JS_DEST, JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done())
.catch(err => done(err));
};
示例5: Builder
export = (done: any) => {
let builder = new Builder(Config.SYSTEM_BUILDER_CONFIG);
builder
.buildStatic(join(Config.TMP_DIR, Config.BOOTSTRAP_FACTORY_PROD_MODULE),
join(Config.JS_DEST, Config.JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done())
.catch((err: any) => done(err));
};
示例6: function
return function (done) {
let builder = new Builder(SYSTEM_BUILDER_CONFIG);
console.log(builder);
util.log('join(TMP_DIR, BOOTSTRAP_MODULE)', chalk.yellow(join(TMP_DIR, BOOTSTRAP_MODULE)));
util.log('join(JS_DEST, JS_PROD_APP_BUNDLE)', chalk.yellow(join(JS_DEST, JS_PROD_APP_BUNDLE)));
builder
.buildStatic(join(TMP_DIR, BOOTSTRAP_MODULE),
join(JS_DEST, JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done());
};
示例7: bundleTask
function bundleTask() {
let builder = new Builder('', prodPath(SYSJS_CONFIG));
return builder
.buildStatic(prodPath(MAIN), prodPath(BUNDLE), { minify: true, sourceMaps: true})
.then(function() {
console.log('Build complete');
})
.catch(function(err) {
console.log('Build error');
console.log(err);
});
}
示例8: builder
export = gulp.task('production:scripts', ['production:scripts:compile'], (callback: () => void) => {
const bundle = new builder({
defaultJSExtensions: true
});
bundle
.buildStatic(paths.bundle.entry, paths.bundle.output, {
format: 'cjs',
minify: true,
mangle: true
})
.then(() => callback());
});
示例9: function
return function(done) {
let builder = new Builder(SYSTEM_BUILDER_CONFIG);
builder
.buildStatic(
`${APP_TEMP}/${BOOTSTRAP_MODULE}`,
`${APP_DEST}/${JS}/${JS_PROD_APP_BUNDLE}`,
{
'format': 'cjs',
'minify': true,
'mangle': false
}
)
.then(() => done());
};
示例10: function
return function (done) {
let builder = new Builder(SYSTEM_BUILDER_CONFIG);
// makes a (Self-Executing) bundle that is independent of the SystemJS loader entirely
// This bundle file can then be included with a <script> tag, and no other dependencies would need to be included in the page.
//
// https://github.com/systemjs/builder#sfx-format
// The first module (TMP_DIR/BOOTSTRAP_MODULE) used as input
// will then have its exports output as the CommonJS exports of the whole SFX bundle itself
// when run in a CommonJS environment
// it saves it into JS_DEST/JS_PROD_APP_BUNDLE
builder
.buildStatic(join(TMP_DIR, BOOTSTRAP_MODULE),
join(JS_DEST, JS_PROD_APP_BUNDLE),
BUNDLER_OPTIONS)
.then(() => done());
};