openzipkin / zipkin-js

Zipkin instrumentation for Node.js and browsers
Apache License 2.0
564 stars 171 forks source link

Open to an ES5 transpile build step? #16

Open guyellis opened 8 years ago

guyellis commented 8 years ago

If I (or someone) can work out a way to do it would you be open to accepting a PR that has a prepublish step that transpiles the ES6 code to ES5 so that ES5 restrained consumers can also use this module?

E.g. prepublish uses babel to generate output to /lib/es5/ before publish and that's the entry point for ES5 consumers. This would not impact the ES6 consumers and the current ES6 being used in the module. i.e. ES6 by default. ES5 needs to be explicitly required by the consumer by path.

Might also help with #1 which might need ES5 for browsers.

sveisvei commented 8 years ago

Shipping a es5 version should be fine, and is probably needed for a universal version. I am all for it atleast

jcchavezs commented 5 years ago

Any input @DavideCarvalho @sonybinhle?

DavideCarvalho commented 5 years ago

I started a branch for this task. I think the best tech for this is rollup, since we can transpile for es5 and es6 at the same time. If someone needs to target only evergreen targets, they can use es6 build (and use stuff like type=module for scripts), otherwise, use es5.

sonybinhle commented 5 years ago

I am for rollup also.

jcchavezs commented 5 years ago

Awesome. I will link this issue in the rollup one. Thanks guys!

Den fre. 23. nov. 2018, 11:20 skrev Binh Le <notifications@github.com:

I am for rollup also.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-js/issues/16#issuecomment-441215893, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7sAj8zeroawNEusqfW3ziBY_jEhBXEks5ux9nqgaJpZM4I4ah3 .