Esri / ember-cli-amd

Ember CLI Addon for using AMD libraries
Apache License 2.0
21 stars 15 forks source link

Add support for package main shorthand in module names #31

Closed tomwayson closed 8 years ago

tomwayson commented 8 years ago

FWIW - this works in my project, and doesn't seem to break any of the other package deps (just esri).

dojo config:

var dojoConfig = {
  async: true,
  packages: [
    {
      name: 'Mapillary',
      location: '//npmcdn.com/mapillary-js@1.4.2/dist',
      main: 'mapillary-js.min'
    }
  ]
};

ember-cli-amd config:

  amd: {
      loader: 'http://js.arcgis.com/3.15/init.js',
      packages: [
        'esri', 'Mapillary'
      ],
      inline: true,
      configPath: 'config/dojo-config.js',
    },

import:

import Mapillary from 'Mapillary';
import arcgisUtils from 'esri/arcgis/utils';
import esriBasemaps from 'esri/basemaps';

resolves #30

odoe commented 8 years ago

Tested and looks good.