Skip to content

Instantly share code, notes, and snippets.

View zacjones93's full-sized avatar
๐Ÿ‹๏ธโ€โ™‚๏ธ

Zac Jones zacjones93

๐Ÿ‹๏ธโ€โ™‚๏ธ
View GitHub Profile
@swyxio
swyxio / Write My Code For Me: Cheating at Developer Experience.md
Last active October 16, 2021 22:01
some thoughts on adding templating/scaffolding to CLIs and how it can be done well

Write My Code For Me: Cheating at Developer Experience

this is a draft of a blogpost that i'll be posting somewhere. Feedback welcome! also feel free to ping me on twitter

I've recently been working on some CLI that involves printing out a bunch of boilerplate template code for developer convenience. I found that there were a few interesting DX angles to this and figured I should write down the rough problem areas and the stances I chose. Most of us are familiar with CLIs like https://yeoman.io/, this task is variously called "scaffolding" or "templating" or some such similar term, with varying degrees of intelligence in the task. I'll refer to it as "templating" in this essay.

Part 1: Should You?

Caramel, not just Sugar

@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active November 27, 2024 13:36
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.