Home

📦 NPM Publishing Reference: @walruswebdev/daily-devhabit-cli

This document outlines the specific requirements for publishing the Daily Dev Habit CLI and its associated core packages to the @walruswebdev scope.

🔐 Token Configuration (NPM Settings)

To allow your automated release scripts to function without manual interruption during the build, ensure your NPM Access Token is configured as follows:


🚀 The Release Workflow

Your package.json uses a release script to ensure that what gets published is always the latest, cleanest version of your code.

How npm publish interacts with the Release Script

When you run your publishing command (npm run release), the following sequence occurs:

  1. Build Trigger: The release script (likely npm run build or a custom release.sh) executes first. This runs tsc to compile your TypeScript into the dist/ folder.
  2. Version Bump: It updates the version number (patch, minor, or major) to avoid "version already exists" errors on the NPM registry.
  3. Clean State: It ensures node_modules are fresh and no stale build artifacts are present.
  4. Final Push: The npm publish --access public command is called, sending the contents of your dist/ and package.json to the registry.