Closed dbleier closed 5 years ago
This looks great, thanks!
Is there any way to achieve this without duplicating all the code across two files?
I am not sure how without breaking existing implementations using script
tags. And if I could pull from the multi
var from the existing file into the new one, we wouldn't need to make this change at all.
I am not saying there isn't a way, but if there is, it is beyond me.
hmm, I might have found a grunt task to do this.
Here we go. I put just the export default multi;
into it's own file and used the concat
task to append it to multi
and build to the multi-es6.min.js
while leaving multi.js
untouched.
Brilliant solution!
I see that you've also run a JS formatter on the code which I've been thinking of doing for so long. If I may ask, which style guide are you using? Would love to keep up the same style.
Big thanks for your help! I also bumped the version to 0.5.0 as I consider this a pretty major feature.
Thanks, I use VSCode as my editor and it has a built in JS formatter that automatically formats the code every time I save.
Thanks for merging this.
can you add 0.5.0 to the npm to I can install via npm?
Hi, any time frame on when the new update will be available in npm? We kinda needs this asap.
Sorry! Been away from a computer for quite a while. Will publish it in a few hours!
Fabian Lindfors
5 dec. 2018 kl. 20:55 skrev Dovid Bleier notifications@github.com:
Hi, any time frame on when the new update will be available in npm? We kinda needs this asap.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
ok, thanks.
0.5.0 is now available on npm!
Jenkins builds not working great with 0.5.0 - thanks! It's a great plugin.
I returned the original multi.js to the way it was since browsers don't support modules in standard script tags.
Then I created a new multi-es6.js which builds to dist/multi-es6.min.js which can be used for ES6 imports.
I also created an example in the examples folder called es6-import.html which is the same as basic.html except it is using the import.
Caveat with the example is you need to run it via a webserver (such as localhost). Running it as file:/// gave me a CORS error. I mention this on the example page.