Dojo loader for SystemJS
Switch branches/tags
Nothing to show
Clone or download
Latest commit 931036b Feb 19, 2017
Permalink
Failed to load latest commit information.
.gitignore add gitignore Feb 19, 2017
LICENSE Initial commit Feb 19, 2017
README.md update thanks. Feb 19, 2017
dojo.js init check in Feb 19, 2017
package.json init check in Feb 19, 2017

README.md

Dojo loader plugin for SystemJS

Installation

First install this plugin with npm:

npm install systemjs-plugin-dojo

Then add map to the loader:

SystemJS.config({
    map: {
        'dojo-loader': 'node_modules/systemjs-plugin-dojo/dojo.js'
    }
});

Setup

First make sure dojo or esri works through dojoConfig, for example:

(function (global) {
    'use strict';
    global.dojoConfig = {
        async: true,
        baseUrl: '.',
        packages: [
            { name: 'dgrid', location: 'bower_components/dgrid' },
            { name: 'dijit', location: 'bower_components/dijit' },
            { name: 'dojo', location: 'bower_components/dojo' },
            { name: 'dojox', location: 'bower_components/dojox' },
            { name: 'dstore', location: 'bower_components/dstore' },
            { name: 'moment', location: 'bower_components/moment' },
            { name: 'esri', location: 'bower_components/esri' }
        ]
    };
})(window);

And link dojo in your html file:

<script src="dojoConfig.js"></script>
<script src="bower_components/dojo/dojo.js"></script>

Then config all dojo related package load with the loader, for example:

SystemJS.config({
    meta: {
        'dojo/*': { loader: 'dojo-loader' },
        'esri/*': { loader: 'dojo-loader' }
    }
});

Demo

See ng2-esri-demo for more details.

License

MIT

Special thanks to