简体   繁体   中英

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.

Unfortunately I'm experience a "regeneratorRuntime is not defined" issue when using it (It has been reported in the repo). 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

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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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