Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use ES6 but vanilla JavaScript for this #8

Closed
iduuck opened this issue Nov 30, 2015 · 3 comments
Closed

Don't use ES6 but vanilla JavaScript for this #8

iduuck opened this issue Nov 30, 2015 · 3 comments

Comments

@iduuck
Copy link
Contributor

iduuck commented Nov 30, 2015

This is such a lightweight script. Why should it utilize ES6 over the good'ol vanilla javascript (ES5). When using the latter it's unnecessary to compile it and the gulpfile is not necessary (perhaps for multi-system compatibility such as support for Require.js, System.js and other module loaders).

What do you think?

@iduuck
Copy link
Contributor Author

iduuck commented Nov 30, 2015

Another thing that should make the point: Size!

I just cloned your repo and the unminified script has a size of 2.4k. The compiled (es6) script has 1.2k and the vanilla js minified would have a total of 927b. This would be a good point.

2.4K  =  jump.es6.js
1.2K  =  jump.js
927B  =  jump.min.js

@callmecavs
Copy link
Owner

@iduuck i see where you're coming from, but honestly to save 1 kb I'd rather use the latest spec, support more complex build processes (Common JS, AMD, etc), and somewhat "future proof" the library. nonetheless, I appreciate your efforts in providing the file size comparison.

@julkue
Copy link

julkue commented Aug 4, 2017

@callmecavs The docs still say:

Jump was developed with a modern JavaScript workflow in mind. To use it, it's recommended you have a build system in place that can transpile ES6, and bundle modules. For a minimal boilerplate that fulfills those requirements, check out outset.

However, at least the npm package is shipped with already transpiled files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants