Using non-ES6 libraries with Ember App Kit


#1

I’m starting off with Ember App Kit, but I’m at a loss for integrating non-ES6 modules into EAK.

For instance, my first requirement is Highcharts. As you can see from its code, the entire library is put in a self-instantiating function.

How do I get this lib to import in my ChartController?

If I’m able to resolve this issue, we can use other JS libs also in our code.


#2

You don’t have to import it into your module if it’s going to be in the global namespace. Javascript is a dynamic language, it’s not going to check references at compile time. Just add the script to your HTML file and use it in your code as the documentation states.


#3

Yes. I found that this method works.

I had been reading up on this, and there is an open issue about this - https://github.com/stefanpenner/ember-app-kit/issues/257

Making sure to add the globals to .jshintrc - https://github.com/stefanpenner/ember-app-kit/issues/257#issuecomment-27201349


#4

This is correct. Tripped me up the other day as well.