Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let's create a package!

Let's create a package!

An overview (that escalates quickly) on creating and maintain a node package

Ariadne Gomes

July 19, 2023
Tweet

Other Decks in Programming

Transcript

  1. This is a work of fiction. Any similarity to actual

    persons, living or dead, or actual events, is purely coincidental. Disclaimer
  2. Rinse and repeat • Update changelog • Commit and publish

    • Create tag • Update package in projects • So on and so forth…
  3. Rinse and repeat • Update changelog • Commit and publish

    • Create tag • Update package in projects • So on and so forth…
  4. Handling special files • .vue – Compile Vue files into

    JS • .css – Transpile if using .scss, .less, etc and publish raw CSS files • .jsx • SolidJS – Transpile and publish raw JSX files • React – Compile into JS • Other assets – publish them raw * Check your favorite framework guides
  5. Build tools • Rollup • Webpack • Parcel • esbuild

    • Turbopack • SWC • Vite • tsup • Unbuild • Tsdx • Microbundle
  6. Publishing packages Monorepo options: • changeset • multi-semantic-release Automate: defining

    next version number, generating the release notes, creating tags and publishing the package. Single package: • semantic-release • gitversion • release-it
  7. Monorepos Pros • Tear down barriers • Code sharing •

    Dependency management • Release management • Refactoring Cons • Initial setup • Build pipelines • Access Control
  8. Inspirations for this talk Packaging libraries talk by Bjorn Lu

    Ship ESM & CJS in one Package by Antfu Maintaining packages at funda