Skip to content

Instantly share code, notes, and snippets.

View tombl's full-sized avatar

Tom tombl

  • Australia
  • 12:28 (UTC +08:00)
View GitHub Profile
@getify
getify / 1.md
Last active March 2, 2023 21:24
In defense of using blocks to create localized scope for variables... (part 1 of 2)
@felixjones
felixjones / AutoGamma.zip
Last active February 7, 2024 09:23
Auto Gamma
@Manamongods
Manamongods / bloom.fsh
Last active June 7, 2021 16:44
Fixes for the bloom in Cinematica (by felixjones) for Minecraft
#version 110
#define COLOR_EXPONENT 0.9 //This makes colors brighter and more saturated. "1.0" would be default
#define SIZE 40.0
#define THRESHOLD 0.8 //Anything brighter than this creates bloom
#define EXPONENT 2.5 //The power raised on the brightness above the threshold
#define INTENSITY 1.0 //How bright the bloom is
@developit
developit / *cjyes.md
Last active July 25, 2023 12:54
more-or-less instant command-line ESM to CJS transform. Copies from src to dist. `cjyes src/*.js`

cjyes npm version

🔍 see jay, yes! 🎉 / 👨🏻‍💻 see, JS! 👾 / ⚓️ sea JS ⛴

If you're publishing ES Modules, you need to also publish CommonJS versions of those modules.

This isn't to support old browsers or Node versions: even in Node 14, using require() to load a module won't work if it's only available as ESM.

cjyes is the bare minimum fix for this problem. You write ES Modules and fill out a valid package.json, and it'll generate the corresponding CommonJS files pretty much instantly. cjyes takes up 500kb of disk space including its two dependencies.