An open API service indexing awesome lists of open source software.

https://github.com/beginor/systemjs-plugin-dojo

Dojo loader for SystemJS
https://github.com/beginor/systemjs-plugin-dojo

dojo loader plugin systemjs

Last synced: about 1 year ago
JSON representation

Dojo loader for SystemJS

Awesome Lists containing this project

README

          

# Dojo loader plugin for SystemJS

## Installation

First install this plugin with npm:

```sh
npm install systemjs-plugin-dojo
```

Then add map to the loader:

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

## Setup

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

```js
(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:

```html

```

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

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

### Demo

See [ng2-esri-demo](https://github.com/beginor/ng2-esri-demo) for more details.

## License

[MIT](LICENSE)

## Special thanks to

- [roemhildtg](https://gist.github.com/roemhildtg/4dce79f9bffe74b99a6a6cea3f44604f)
- [tomwayson](https://github.com/tomwayson)