Skip to content

Instantly share code, notes, and snippets.

@robwormald
Last active November 30, 2016 20:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robwormald/c827816d6fb9a8806c064dd435e083a9 to your computer and use it in GitHub Desktop.
Save robwormald/c827816d6fb9a8806c064dd435e083a9 to your computer and use it in GitHub Desktop.
//for a dynamically loaded application
// <script src="system.js">
// <script src="system.config.js">
// <script>
// System.import('app');
// </script>
//for a prebuilt app
var Builder = require('systemjs-builder');
//bundle task
gulp.task('bundle', function(){
var builder = new Builder();
//returns a promise
return builder.loadConfig('./system.config.js')
.then(function() {
// ready to build
// returns a promise
return builder.buildStatic('app', 'dist/app.js');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment