zipkin-js icon indicating copy to clipboard operation
zipkin-js copied to clipboard

Open to an ES5 transpile build step?

Open guyellis opened this issue 8 years ago • 5 comments

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.

guyellis avatar Jun 17 '16 14:06 guyellis

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

sveisvei avatar Jun 17 '16 15:06 sveisvei

Any input @DavideCarvalho @sonybinhle?

jcchavezs avatar Nov 23 '18 09:11 jcchavezs

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.

DavideCarvalho avatar Nov 23 '18 10:11 DavideCarvalho

I am for rollup also.

sonybinhle avatar Nov 23 '18 11:11 sonybinhle

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

Den fre. 23. nov. 2018, 11:20 skrev Binh Le <[email protected]:

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 .

jcchavezs avatar Nov 26 '18 06:11 jcchavezs