Как я могу использовать ember-simple-auth с ember-cli?

Я пытаюсь адаптировать инструкции на https://github.com/simplabs/ember-simple-auth для сборки приложения с помощью ember-cli версии 0.0.28. Я новичок в ember-cli и использовании модулей AMD.

Может ли кто-нибудь помочь с правильным способом / местом для импорта ember-simple-auth, а не глобального пространства имен, как указано в README?

Следующий инициализатор

import SimpleAuth from 'vendor/ember-simple-auth/amd/ember-simple-auth';

export default {
  name: 'authentication',
  initialize: function(container, application) {
    SimpleAuth.setup(container, application);
  }
}

Компилируется в

define("myapp/initializers/ember-simple-auth", 
  ["vendor/ember-simple-auth/amd/ember-simple-auth","exports"],
  function(__dependency1__, __exports__) {
    "use strict";
    var SimpleAuth = __dependency1__["default"];

    __exports__["default"] = {
      name: 'authentication',
      initialize: function(container, application) {
        SimpleAuth.setup(container, application);
      }
    }
  });//# sourceURL=myapp/initializers/ember-simple-auth.js

И __dependency1__ не определено.


person aceofspades    schedule 24.05.2014    source источник


Ответы (1)


См. инструкции по установке ember-cli в README: https://github.com/simplabs/ember-simple-auth#installation — к сожалению, пока невозможно импортировать отдельные части Ember.SimpleAuth.

person marcoow    schedule 28.05.2014