Tagged “javascript”
-
De-Microsofting Your Development Environment
commentary javascript rescript toolingAnyone who has been following the web ecosystem over the last few years knows it has been rapidly consolidating under Microsoft. That consolidation economically threatens the open web. Diversifying your tooling could protect you as much as diversifying any investment, and it's much more convenient than you might think.
-
Continuously Deploying to GitLab's NPM Package Registry
devops gitlab javascript npm rescriptIn a previous article, we explored how to continuously deploy to the npmjs.com package registry. This is all well and good, but an advantage of CI/CD is that we can easily deploy wherever we want. This article will explore how to deploy an npm package to both npmjs.com and GitLab's own package registry, including how to change package names when necessary.
-
Binding to a JavaScript Function that Returns a Variant in ReScript
javascript indexeddb rescript variantNote from the future: In the current year, none of this article is relevant anymore. Use Rescript's
@unboxed
attribute instead. It solves the whole problem I was trying to solve with this article, but much more cleanly. I will leave this article here as a historical record. ReScript provides easy ways to bind to most JavaScript functions in a way that feels both native and safe. Conveniently, it even provides an@unwrap
decorator for parametric polymorphism. However, there are a few places where we still have to fill in the gaps. This article documents how to bind to a JavaScript function that can return any one of several different types using ReScript variants.
-
How to Use Excerpts in Eleventy
eleventy javascriptRecently, I added first-paragraph post excerpts to this Eleventy blog's homepage post list. I found it wasn't easy. It wasn't all documented all in one place. Further, in order to use Markdown excerpts in HTML, I had to write a simple custom filter. I'd like to document the process here from end to end.
See all tags.