如何在 ember-engines 中使用 in-repo-addons?

how to use in-repo-addons in the ember-engines?

我已经创建并 ember 回购插件。假设 say-hello。之后我创建了 ember-eninge。假设 users-engine

在可能的主应用程序中我可以直接使用插件作为

//application.hbs
{{say-hello}}

如何在用户引擎中使用它?

//lib/users-engines/templates/index.hbs
{{say-hello}} //It is not working also not throwing any error 

我找到了答案,但不确定它是否正确。

users-engine/package.json添加插件的相对路径

{
  "name": "users-engine",
  "keywords": [
    "ember-addon",
    "ember-engine"
  ],
  "dependencies": {
    "ember-cli-htmlbars": "*"
  },
  "ember-addon": {
    "paths": [
      "../say-hello"
    ]
  }
}

现在您可以直接在 ember-engine 中使用 in-repo-addon。

//lib/users-engines/templates/index.hbs
{{say-hello}} //It is working now.