ramda.github.io
ramda.github.io copied to clipboard
Consider use of unpkg CDN for REPL libraries
Since there have been reliability issues with the REPL libraries in the past, would it be worthwhile switching over to unpkg?
It has a latest version redirect as well as allowing specific versions.
My understanding of the currently used wzrd.in service is that it performs extra steps to bundle the code, but since the code is already bundled in the repo, maybe it would be quicker to use a straight CDN.
what wzrd gives up is "browserify as a service" which i believe is required to serve up RF and S which are not bundled for the browser
Given the benefits of having a browser version in the package, would it be worthwhile adding these to Ramda Fantasy?
I hope @davidchambers doesn't mind me pinging him on his thoughts of adding it to Sanctuary.
what wzrd gives up is "browserify as a service" which i believe is required to serve up RF and S which are not bundled for the browser
Actually, Sanctuary should run in the browser.
So it would be possible to serve it up with unpkg?
So it would be possible to serve it up with unpkg?
Yes. I just confirmed that this works:
<script src="https://unpkg.com/[email protected]/dist/ramda.js"></script>
<script src="https://unpkg.com/[email protected]/index.js"></script>
<script src="https://unpkg.com/[email protected]/index.js"></script>
Keep in mind that the Sanctuary module is exported as window.sanctuary, so you may need something like window.S = window.sanctuary; somewhere. :)
in that case we could either bundle RF for the browser or just use S. either is fine with me
Quickest fix would seem to be adding a prepublish script to run browserify on Ramda-Fantasy.
The browser file can be ignored from the Git repo (and that seems to be encouraged).
Rebinding variables for the REPL would be a useful option. I'm not sure if it already does it, although I have seen there seems to be options on what gets exposed, and I guess that is similar.
I haven't looked at the Ramda Fantasy code at all, but I could have a go at hooking up that script if people are keen.
@MattMS you can reuse or supercede this https://github.com/ramda/ramda-fantasy/pull/129/files
@buzzdecafe (if I'm not mistaken) it seems that PR only needs the dist files removed and added to .gitignore.
In that case, would it be easier for you to make that change?