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

Es6 support #27

Closed dbleier closed 5 years ago

dbleier commented 5 years ago

I have updated the npm plugins to latest version with ES6 support, updated src/multi.js to include export default multi;, built with grunt, upped the version.

dbleier commented 5 years ago

discovered this conflicts with browsers. Updated and will make new PR.

dbleier commented 5 years ago

ok, I decided to just to update this PR.

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.

dbleier commented 5 years ago

doesn't seem to be pulling the latest changes. Closing and creating a new one.