Goal
Make merjs installable via npm: npm install -g merlionjs or npx merlionjs init my-app
Deliverables
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
- User runs
npm install -g merlionjs
postinstall hook runs install.js
- Script detects platform (macOS/Linux/Windows) and arch (x64/arm64)
- Downloads appropriate binary from GitHub releases
- Verifies SHA256 checksum
- 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
Goal
Make merjs installable via npm:
npm install -g merlionjsornpx merlionjs init my-appDeliverables
packages/npm/package structuremerlionjspackagePackage Structure
Installation Flow
npm install -g merlionjspostinstallhook runsinstall.jsbin/directoryInstall Commands
Technical Details
https://github.com/justrach/merjs/releasesPublished
✅ Package: https://www.npmjs.com/package/merlionjs
Note on Package Name
Originally tried
merjsbut npm rejected it for similarity to existing packages (merge, memfs, ejs, pegjs). Usingmerlionjsinstead which matches the website domain.Related