Publishing a simple client-side JavaScript package to npm with GitHub Actions | Simon Willison’s TILs
13-Dec-2024 23
Here's what I learned about publishing a single file JavaScript package to NPM for my Prompts.js project.For this project, I wanted to create an old-fashioned JavaScript file that you could include in a web page using a tag. No TypeScript, no React JSK, no additional dependencies, no build step.
I also wanted to ship it to NPM, mainly so it would be magically available from various CDNs.
I think I've boiled that down to about as simple as I can get. Here's the package.json file:.
Publishing a simple client-side JavaScript package to npm with GitHub Actions | Simon Willison’s TILs #js #javascript #Publishing #simple #client-side #JavaScript #package #GitHub #Actions #Simon #Willison’s #github #javascript https://javascript.ba/link/publishing-a-simple-client-side-javascript-package-to-npm-with-github-actions-simon-willison-s-tils