Open gausam opened 8 years ago
Never mind. Issue turned out to be something else. I made some changes to the library so it could be imported whether in an npm or window or amd environment (took some notes from HammerJS) Would you consider this for js-toast? Happy to send in a PR in that case.
How we're using it in production: https://github.com/ihatehandles/js-toast/blob/master/toast.js
Hi Sam, your fork looks very nice! However, Quantum.js does not support modules yet, so I cannot pull your changes just for Toast.js yet. I will definitely consider it after I figure out how to sort out Quantum's module handling. Thank you :+1:
Nice, didn't know about Quantum.js - will definitely check it out.
Will wait on the module support (however you will implement it) - please ping me when it's ready.
How I wired it up into Webpack via Bower:
Cheers!
@ihatehandles Hi Sam, Toast can be used as a module now.
Using toast.min.js
:
const Toast = require('./toast');
Toast(...);
Using toast.mod.js
, the require()
function is in window
, so it can be required directly in the browser:
const Toast = require('iqwerty-toast');
Toast(...)
Hopefully this is useful to you! Thanks :smile:
Hi Michael, would you consider publishing js-toast on Bower so that it can be used proper in Bower pipelines?
Thanks for teh lib btw!