简体   繁体   English

如何在本地运行aurelia-plugins / aurelia-plugins-google-places-autocomplete

[英]How to run aurelia-plugins/aurelia-plugins-google-places-autocomplete locally

I have installed this aurelia plugin in my project: https://github.com/aurelia-plugins/aurelia-plugins-google-places-autocomplete which is basically an Aurelia wrapper for google places autocomplete. 我已经在我的项目中安装了这个aurelia插件: https : //github.com/aurelia-plugins/aurelia-plugins-google-places-autocomplete基本上是Google Places自动完成功能的Aurelia包装器。

Unfortunately I'm experience a "regeneratorRuntime is not defined" issue when using it (It has been reported in the repo). 不幸的是,使用它时遇到“未定义regeneratorRuntime”问题(已在回购中报告)。 And the reason seems to be the way that async/await are transpiled. 原因似乎是异步/等待被编译的方式。 I have found a possible solution to fix the issue as seen here: Babel 6 regeneratorRuntime is not defined with async/await 我找到了解决此问题的可能解决方案,如下所示: Babel 6 regeneratorRuntime未使用async / await定义

I have cloned the repo and installed now I just need to be able to run it locally to test it out. 我已经克隆了仓库并安装了它,现在我只需要能够在本地运行它就可以对其进行测试。 Does someone know how I can run that repo locally. 有人知道我如何在本地运行该存储库。 Thank you very much. 非常感谢你。

Usually what I do when I want to test a plugin is I will create test project where I run the plugin as a feature. 通常,当我要测试插件时,我要做的就是创建测试项目,在其中运行插件作为功能。 Features work just like plugins except they are local to your project's structure. 功能与插件一样工作,只是它们在项目结构中是本地的。 Instead of doing 而不是做

aurelia.use
  .plugin('aurelia-plugins-google-places-autocomplete', config => { \\...

You will do 你会去做的

aurelia.use
  .feature('aurelia-plugins-google-places-autocomplete', config => { \\...

This is assuming you place the plugin in src\\aurelia-plugins-google-places-autocomplete . 这是假设您将插件放置在src\\aurelia-plugins-google-places-autocomplete

This is a story that I would like to see us come up with a pattern for. 这是一个我希望看到我们提出一个模式的故事。 Maybe we'll add something to the skeleton-plugin project that will help with this. 也许我们会在skeleton-plugin项目中添加一些东西来帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM