Skip to content

Publish merjs to npm registry #77

@justrach

Description

@justrach

Goal

Make merjs installable via npm: npm install -g merlionjs or npx merlionjs init my-app

Deliverables

  • Create packages/npm/ package structure
  • Set up npm account for merlionjs package
  • Configure CI workflow for automated publishing on release
  • Test on macOS (Intel/ARM), Linux (x64/ARM64), Windows
  • Update README with npm installation instructions

Package Structure

packages/npm/
├── package.json       # Main package manifest
├── index.js           # Programmatic API
├── install.js         # Post-install binary download
├── bin/mer            # CLI wrapper
└── README.md

Installation Flow

  1. User runs npm install -g merlionjs
  2. postinstall hook runs install.js
  3. Script detects platform (macOS/Linux/Windows) and arch (x64/arm64)
  4. Downloads appropriate binary from GitHub releases
  5. Verifies SHA256 checksum
  6. Places binary in bin/ directory

Install Commands

# Global install
npm install -g merlionjs
mer init my-app

# One-time use with npx
npx merlionjs init my-app

Technical Details

  • Downloads from: https://github.com/justrach/merjs/releases
  • Supports: macOS (x64/arm64), Linux (x64/arm64), Windows (x64)
  • Requires Node.js 16+
  • No runtime Node.js dependency for the framework itself

Published

Package: https://www.npmjs.com/package/merlionjs

Note on Package Name

Originally tried merjs but npm rejected it for similarity to existing packages (merge, memfs, ejs, pegjs). Using merlionjs instead which matches the website domain.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions