Better CDN builds
As from Gleb's talk and some hacking during the cycleconf, the CDN experience is not yet smooth: people need to require all the different libraries, in the right order as they have dependencies (i.e: cycle-run requires xstream) plus the documentation doesn't help much.
We should think if we want to have CDN builds per stream library, so that a user could start with cycle+xstream with a single script (same for rxjs and most). What do we think such builds should contain? Only run + stream or run + stream + dom? other?
Things to address:
- what kind of CDN builds we want to provide
- where to host them
- how to deprecate the current ones out there that are the cause of the confusion.
- how to build those automatically so that once new version get released, such builds get updated
- improve documentation
cc: @chriscartlidge
While CDN build are easy to access, as far as I know typescript typings cannot be accessed so there is no intellisense available. That's a loss for people exploring cyclejs IMHO
where to host them
Published npm packages automatically appear on https://unpkg.com. However I don't know what the performance and latency are like. We just and a UMD build to the package (with correct globals). As in package the golbal script is then available for local use as well as via a CDN.
how to build those automatically so that once new version get released, such builds get updated
See above. It's easy peasy using webpack and unpkg. We'd just need a CI/CD to npm if there is not already one. Eg Travis.
Here's a nice template but it has a few issues with index.html & HMR which should not be in a lib build. I stripped them out.
This post is also very helpful Compiling and bundling TypeScript libraries with Webpack
I'm not sure if UDM is actually required if only targeting global scripts. It certainly adds bloat with the context testing IEFE but may be the only way to bundle modules
what kind of CDN builds we want to provide
I'd aim for those useful for people wanting to play with cyles js, Real systems will probably use the npm packages In a build process. Thus size is less of a problem so could be complete builds with cycle, stream, dom and other highly useful drivers.
I'd offer to help as I've been fighting with builds but I have no spare cycles right now.