fabianlindfors / multi.js

A user-friendly replacement for select boxes with the multiple attribute enabled
https://fabianlindfors.se/multijs
MIT License
953 stars 76 forks source link

added export to multi.min.js #25

Closed dbleier closed 5 years ago

dbleier commented 5 years ago

When installing as npm package for use in node style projects with import statements, there was no export so the plugin isn't working.

dbleier commented 5 years ago

probably should add to multi.js in src file too.

fabianlindfors commented 5 years ago

Hi! This looks great. Please add the changes to the src/multi.js and then build with Grunt and bump the version number.

Thank you!

dbleier commented 5 years ago

so I tried but got the following error.

Warning: Uglification failed.
Unexpected token: keyword (default). 
Line 301 in src/multi.js

I am not used to using grunt. Any suggestions?

dbleier commented 5 years ago

seems like the version of grunt/uglify you are using doesn't support ES6.

dbleier commented 5 years ago

so to get this to build, I had to switch to harmony branch and change the loadNpmTask as per this post: https://davidburgos.blog/how-to-fix-grunt-contrib-uglify-for-es6/

then it worked. But I don't know if you want me to push this with these dependencies.

fabianlindfors commented 5 years ago

That's an annoying issue. Maybe there is a replacement for uglify that could be used which supports ES6?

I unfortunately don't have enough time to look into this right now. I you want to do try and solve it I would really appreciate it!

dbleier commented 5 years ago

ok, I'll continue to look into this as it is a bit of a blocker for us to do CI/CD.

fabianlindfors commented 5 years ago

I see! Looking forward to seeing what you work out. :)

27 nov. 2018 kl. 23:32 skrev Dovid Bleier notifications@github.com:

ok, I'll continue to look into this as it is a bit of a blocker for us to do CI/CD.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fabianlindfors/multi.js/pull/25#issuecomment-442243382, or mute the thread https://github.com/notifications/unsubscribe-auth/AEJNvax25GxsajFFCT0y9knYJwxFddtFks5uzb1-gaJpZM4YyGxB.