@ngstarter/systemjs-extension
v2.0.1
Published
SystemJS build extension for Angular Starter
Downloads
117
Maintainers
Readme
systemjs-extension
SystemJS build extension for Angular 2 Starter
Getting started
Make sure you have
systemjs.conf.js
in the starter rootInstall the extension
npm install @ngstarter/systemjs-extension --save
Open
gulp.config.js
in the starter and add the following builder configvar systemJs = { builder: { normalize: true, minify: true, mangle: true, runtime: false, globalDefs: { DEBUG: false, ENV: 'production' } } };
Go to tasks/build.js in your starter, require the extension
// Get the starter gulp config var config = require('../config')(); // Load the extension with the config require('@ngstarter/systemjs-extension')(config);
and then set the second param to
build-systemjs
gulp.task('build', function (done) { runSequence('test', 'build-systemjs', 'build-assets', done); });
Done! Try to build it!
API
Use own systemjs config
// Get gulp config
var config = require('../config')();
// Get SystemJs config path
var systemJsConfig = 'src/systemjs.config.js';
// Load extension with config and SystemJsConfig
require('@ngstarter/systemjs-extension')(config, systemJsConfig);
License
MIT