Skip to content

Instantly share code, notes, and snippets.

/test.js Secret

Created November 13, 2015 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/085a7ea315bcdf99e217 to your computer and use it in GitHub Desktop.
Save anonymous/085a7ea315bcdf99e217 to your computer and use it in GitHub Desktop.
// systemjs.config.js
System.config({
baseURL: "./",
defaultJSExtensions: true,
transpiler: 'babel',
babelOptions: {
'presets': ['es2015']
}
});
// build.js
'use strict';
const Builder = require('systemjs-builder');
const builder = new Builder();
builder.loadConfig('systemjs.config.js')
.then(function build() {
builder.buildStatic('./main.js', './build/app.js')
.then(function onSuccess() {
console.log('Build complete');
})
.catch(function onError(err) {
console.log('Build error');
console.log(err);
});
});
// main.js
const sender = 'Johan';
const message = `Hello from ${sender}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment