-
-
Save anonymous/085a7ea315bcdf99e217 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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