如何在ember-cli中使用ember-simple-auth?

时间:2014-05-24 04:36:57

标签: ember-cli ember-simple-auth

我尝试使用ember-cli的v0.0.28修改https://github.com/simplabs/ember-simple-auth上的说明以进行应用构建。我是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__未定义。

1 个答案:

答案 0 :(得分:2)

请参阅自述文件中的ember-cli的安装说明:https://github.com/simplabs/ember-simple-auth#installation - 遗憾的是,现在还无法导入Ember.SimpleAuth的各个部分。