Requirements
MorJS requires Node.js >= 12.13.0. You can check your current version with:Install the CLI
Install@morjs/cli globally to get the mor command available system-wide.
- npm
- yarn
- pnpm
Verify installation
@morjs/cli printed to the terminal.
Adding MorJS to an existing project
If you already have a mini-program project, add the CLI and compiler as development dependencies:- npm
- yarn
- pnpm
package.json scripts using mor directly:
package.json
Adding runtime support
For cross-platform runtime APIs (App, Page, Component lifecycle bridging), add@morjs/core:
- npm
- yarn
- pnpm
@morjs/core is a runtime dependency, not a dev dependency. It is required at runtime when autoInjectRuntime is enabled (the default for cross-platform compilation).Next steps
Project Setup
Scaffold a new project and understand the directory structure.
Configuration
Learn how to configure
mor.config.ts for your project.