Elegantly Produce & Consume Compiled Packages
Benefits to the Ecosystem
If this gains popularity, it will greatly reduce the complexity and difficulty of consuming and producing compiled packages, which is becoming ever increasingly common thanks to accepted power of tools like Babel, TypeScript, JSX, and traditional tools like CoffeeScript.
Currently most people are publishing their compiled code, that may not target all environments, may not mention this, and will need to be recompiled and repackaged, ineffective for runtime by bundlers like rollup, webpack, and browserify. Consumers often have no power over this, and if a hickup occurs, they have to delve into the package, of which none of this was documented, and figure out what overrides and recompilations need to occur.
By publishing multiple editions, with optional autoloader and readme updater - the power stays with the producer and the consumer. We've implemented this over at https://www.npmjs.com/package/editions (see dependents) and it has worked terrifically well for our use cases. Editions range from Babel, JSX, Flow Type, and CoffeeScript.
Useful to you
projectzmeta builder project
editionsautoloader and standard documentation
- Bevry's base files for seting up new projects
Useful to me
- Supplementary notes I documented for this talk
- Pieces of code that helped develop this talk
- All the different versions of the slides
Unless stated otherwise all works are:
- Copyright © Benjamin Lupton
and licensed under: