tech(systemjs): starting work on systemjs bundling

This commit is contained in:
Torkel Ödegaard
2015-12-17 19:18:30 +01:00
parent df1e52e394
commit 545c39356a
11 changed files with 67 additions and 35 deletions

27
tasks/systemjs_task.js Normal file
View File

@ -0,0 +1,27 @@
module.exports = function(grunt) {
"use strict";
grunt.registerTask('systemjs:build', function() {
var path = require("path");
var Builder = require('systemjs-builder');
var done = this.async();
// optional constructor options
// sets the baseURL and loads the configuration file
var builder = new Builder('public_gen', 'public_gen/app/systemjs.conf.js');
console.log('Starting systemjs-builder');
builder
.bundle('app/app', 'public_gen/app/app.js')
.then(function() {
console.log('Build complete');
done();
})
.catch(function(err) {
console.log('Build error');
console.log(err);
done();
});
});
};