Package and Registry...
For this weeks lab, I had to release my CLI tool to an official registry. For this I chose NPM. As well, I had to tag my release on GitHub as well as the registry.
The information I used in helping figure out how to do so can be found below.
NPM Docs
Bun Docs
Errors with build command
GitHub Copilot. Used it for helping solve an error when I built my program. My error was that my index.ts converted to index.js was not present in my dist/ folder. This was because I had an issue with my tsConfig file. I could not find the fix online, but Copilot helped me find my importing error.
Process...
The process for this release was as follows:
Researched the registry I was going to upload to. Bun has a publish command, but it is not in effect yet so I had to convert to node project and build it that way.
Setup my package.json. Set up my package.json file to include the dist/ directory and the command to be used by my CLI tool once published as well as the version and description.
Reconfigured my project. Moved around some files and imports to allow for the project to be run as an NPM module. Without this I could not properly build the project to a js equivalent and publish it.
Ran the build script. Used bun run build to build the project to a js app from my ts files.
Made an npm account. Made an account with .↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
SOCIAL SHARE CARD GENERATOR