jeremyckahn/shifty

Default import issue

kimmobrunfeldt opened this issue · 2 comments

Hi,

I'm forwarding an issue mentioned in progressbar.js. The gist is here: kimmobrunfeldt/progressbar.js#256

This import exmaple doesn't seem to work (I quickly tested with node shell):

> const shifty = require('shifty');
undefined
> shifty.tween({ from: { x: 0 }, to: { x: 10 } });
Thrown:
TypeError: shifty.tween is not a function

Hi @kimmobrunfeldt! Thanks for logging this issue. I think this is a result of my bundling of Shifty for ES6 environments. I think the most practical solution for CommonJS loaders is to do what @RoyMudie did here: kimmobrunfeldt/progressbar.js#256 (comment)

...Which sure enough reveals an error in my documentation. 😅Apologies about that. I will fix that for you when I get a chance!

Note: This should be improved in 2.9.1: All modules are now published as ES6 modules. 3180c28