jscad / csg.js

DEPRECATED: CSG Library for JSCAD (See the link below)
https://github.com/jscad/OpenJSCAD.org/tree/master/packages/modeling
MIT License
217 stars 56 forks source link

Is babel really needed ? #14

Closed dav-m85 closed 7 years ago

dav-m85 commented 7 years ago

I noticed the package.json devdepends (a new verb) on babel for es2015 transpiling. After looking at the files, it seems this is only for having the "import" keyword in the tests. Considering swaping for good ol' require would avoid the whole transpiling stack, I think it would be nice.

Or I am missing something ?

dav-m85 commented 7 years ago

meh. ava actually depends on:

"babel-code-frame": "^6.7.5", "babel-core": "^6.3.21", "babel-plugin-ava-throws-helper": "0.0.4", "babel-plugin-detective": "^1.0.2", "babel-plugin-espower": "^2.1.0", "babel-plugin-transform-runtime": "^6.3.13", "babel-preset-es2015": "^6.3.13", "babel-preset-stage-2": "^6.3.13"

So actually puting it in the package.json seems overkill. I'll update https://github.com/jscad/csg.js/pull/2 without it.

kaosat-dev commented 7 years ago

@dav-m85 also not exactly a huge fan of this right now. I seem to recall a few ways to have ES6 modules without Babel, but cannot remember exactly... also Firefox just landed experimental support for ES6 modules (behind a flag), I am still 50/50 on them , although I like the syntax, and potential size improvements down the line.

kaosat-dev commented 7 years ago

doh' also forgot : once we start 'upgrading' the code we might still need babel (or bublé for simplicity) to ensure compatibility with older engines (node 4.x etc)