So I like to play around with generative AI. I'll be writing more about it, but sometimes it gets boring just having it answer the questions in its own bland voice.
Why not ask it to answer as a famous author?
So here's an experiment I ran. I asked Claude the following:
Explain to me like I'm really high on LSD and love the works of Faulkner how to get started with GitHub packages.
The repository sprawls before you like Yoknapatawpha County itself, brother, all twisted branches and forgotten commits stretching back through generations of code…
Listen, friend, GitHub packages are like Faulkner's stream of consciousness, but instead of Benjy's fragmented memories, you're dealing with fragments of code that need to flow together into something beautiful and terrible and true.
First, you gotta understand that a package is like one of William's stories - it's a self-contained universe that other universes can pull into themselves. Just as “The Sound and the Fury” contains multitudes but can be referenced by other works, your package contains functionality that other projects can consume.
The Genesis (or should I say, the git init?):
Start in your project directory - this is your Jefferson, Mississippi, your ground zero. You need a package.json file, which is like the genealogy of the Compson family, but instead of tracking madness and decline, it tracks dependencies and versions:
{
"name": "@your-username/your-package-name",
"version": "1.0.0",
"description": "Like Absalom, Absalom! but in code form"
}
See how the name starts with @? That's your namespace, your county, your domain where your packages live and breathe and have their being.