morphik-core/ee/ui-component/PUBLISHING.md
2025-04-21 14:51:08 -07:00

1.5 KiB

Publishing the @morphik/ui Package

This document provides instructions for publishing the @morphik/ui package to npm.

Prerequisites

  1. You must have an npm account
  2. You must be added as a contributor to the @morphik organization
  3. You must be logged in to npm via the CLI (npm login)

Publishing Steps

  1. Ensure all changes are committed to the repository

  2. Update the version in package.json (follow semantic versioning)

    npm version patch  # For bug fixes
    npm version minor  # For new features
    npm version major  # For breaking changes
    
  3. Build the package

    npm run build:package
    
  4. Run a dry-run to check the package contents

    npm pack --dry-run
    
  5. Publish the package

    npm publish --access public
    
  6. Create a git tag for the release

    git tag v$(node -p "require('./package.json').version")
    git push origin v$(node -p "require('./package.json').version")
    

Installing for Local Development

If you want to test the package locally before publishing, you can use npm link:

  1. In the ui-component directory:

    npm link
    
  2. In your project that uses the package:

    npm link @morphik/ui
    

Alternatively, you can install from a local directory:

npm install /path/to/morphik-core/ui-component

Or from a GitHub repository:

npm install github:morphik-org/morphik-core#subdirectory=ui-component