Skip to content

Instantly share code, notes, and snippets.

@denisemauldin
Created May 2, 2017 06:12
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 denisemauldin/d992a48964266e0ec19fe45f56701e11 to your computer and use it in GitHub Desktop.
Save denisemauldin/d992a48964266e0ec19fe45f56701e11 to your computer and use it in GitHub Desktop.
System JS configuration for JointJS, Dagre, JQuery, Graphlib, Lodash 3.10.1 and Backbone 1.3.3.
(function () {
System.config({
// map tells the System loader where to look for things
map: {
'app': '/static/app',
// angular bundles
'@angular/core': '/static/libs/@angular/core/bundles/core.umd.js',
'@angular/common': '/static/libs/@angular/common/bundles/common.umd.js',
'@angular/compiler': '/static/libs/@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': '/static/libs/@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': '/static/libs/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': '/static/libs/@angular/http/bundles/http.umd.js',
'@angular/http/testing': '/static/libs/@angular/http/bundles/http-testing.umd.js',
'@angular/router': '/static/libs/@angular/router/bundles/router.umd.js',
'@angular/forms': '/static/libs/@angular/forms/bundles/forms.umd.js',
// other
'rxjs': '/static/libs/rxjs',
'jquery': '/static/libs/jquery/dist/jquery.min.js',
'lodash': '/static/libs/lodash/index.js',
'underscore': '/static/libs/lodash/index.js',
'*': {
'underscore': '/static/libs/lodash/index.js',
},
'backbone': '/static/libs/backbone-min.js',
'dagre': '/static/libs/dagre/dagre.js',
'graphlib': '/static/libs/graphlib/graphlib.js',
'jointjs': '/static/libs/jointjs/joint.js',
'foundation-sites': '/static/libs/foundation-sites/foundation.min.js',
'angular2-modal': '/static/libs/angular2-modal.umd.js',
'angular2-modal/plugins/vex': '/static/libs/angular2-modal.vex.umd.js',
'datatables.net': '/static/libs/datatables/js/jquery.dataTables.js',
'datatables.net-zf': '/static/libs/datatables/js/dataTables.foundation.js',
'datatables.net-buttons': '/static/libs/datatables/js/dataTables.buttons.js',
'datatables.net-buttons-html5': '/static/libs/datatables/js/buttons.html5.js',
'datatables.net-buttons-print': '/static/libs/datatables/js/buttons.print.js',
'datatables.net-buttons-zf': '/static/libs/datatables/js/buttons.foundation.js',
'datatables.net-responsive': '/static/libs/datatables/js/dataTables.responsive.js',
'datatables.net-responsive-zf': '/static/libs/datatables/js/responsive.foundation.js',
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
main: './main.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
},
},
meta: {
'jointjs': {
exports: 'joint',
deps: ['jquery', 'lodash', 'underscore', 'backbone', 'dagre', 'graphlib']
},
'backbone': {
deps: ['underscore'],
},
'graphlib': {
deps: ['lodash'],
},
'dagre': {
deps: ['lodash'],
}
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment