livereload / livereload-js

LiveReload JavaScript code that communicates with the server and implements reloading
http://livereload.com/
MIT License
830 stars 190 forks source link

Consider replacing coffeescript with ES6 #70

Closed smhg closed 5 years ago

smhg commented 6 years ago

Remaining TODO's:

andreyvit commented 6 years ago

I would absolutely love this. Also, let's simplify the code and the build process as much as humanly possible.

andreyvit commented 6 years ago

Just a note: I've started experimenting with this, using decaffeinate and a new stack based on rollup, buble and mocha. Not ready to commit yet, but going well. Will re-decaf any new changes you make, don't worry.

smhg commented 5 years ago

I've added a branch where I've applied decaffeinate + babel + eslint. The result still works in my dev env (hooray!).

I see only one disadvantage currently: the filesize of dist/livereload.js went up significantly (123KB vs 38KB). This is largely due to babel adding polyfills. They could of course be removed (see .babelrc) but coffeescript might have taken care of some which might lead to issues in some environments. This will be a major (3.0.0) release so maybe it is best to limit support to modern browsers (and thus go easy on polyfills).

smhg commented 5 years ago

Also removed Grunt in that branch. No more security warnings in dev.

smhg commented 5 years ago

I've prepared a 3.0.0-alpha.1 release which removes coffeescript.