Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Systemjs-builder, basic useage / configuration

Writer Andrew Henderson

Hello I'm trying to test the systemjs-builder, the readme has a nice getting started section but where do I put the builder code?

The code I'm referring to is below, I'm not sure where to put this (is this the builder.config?):

var path = require("path");
var Builder = require('systemjs-builder');
// optional constructor options
// sets the baseURL and loads the configuration file
var builder = new Builder('path/to/baseURL', 'path/to/system/config-file.js');
builder
.bundle('local/module.js', 'outfile.js')
.then(function() { console.log('Build complete');
})
.catch(function(err) { console.log('Build error'); console.log(err);
});

Is there a demo build out there that I can look at?

2

1 Answer

You'd put that in your front-end building pipeline. For instance, inside of a gulp task.

While in a development build you could just serve all your files separately, in a production build you'd bundle and minify them to reduce the number of HTTP requests.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.