Last active
April 26, 2017 17:10
-
-
Save mikaelkaron/25e7b482e7629a197beb623dff49ea3b to your computer and use it in GitHub Desktop.
SystemJS package an existing bundle
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
var Builder = require("systemjs-builder"); | |
var builder = new Builder({ | |
baseURL: "node_modules", | |
map: { | |
"jquery": "jquery/dist/jquery.js", | |
"text": "systemjs-plugin-text/text.js", | |
"css": "systemjs-plugin-css/css.js", | |
"clerk": "." | |
}, | |
paths: { | |
"clerk/*": "./*" | |
}, | |
packages: { | |
"clerk": { | |
"main": "module" | |
}, | |
"mu-jquery-app": { | |
main: "dist/mu-jquery-app.js" | |
} | |
}, | |
meta: { | |
"mu-jquery-widget/widget": { | |
build: false | |
} | |
} | |
}); | |
builder | |
.bundle('mu-jquery-app + clerk', 'outfile.js') | |
.then(function () { | |
console.log('Build complete'); | |
}) | |
.catch(function (err) { | |
console.log('Build error'); | |
console.log(err); | |
}); |
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
var widget = require("mu-jquery-widget/widget"); | |
module.exports = widget.extends({ | |
"test": 123 | |
}); |
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
{ | |
"name": "build", | |
"version": "0.0.0", | |
"description": "", | |
"main": "", | |
"author": "", | |
"license": "", | |
"devDependencies": { | |
"jquery": "^3.2.1", | |
"systemjs-builder": "^0.16.4" | |
}, | |
"dependencies": { | |
"mu-jquery-app": "^20.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment