Mojito CLI Build
raw JSON → 0.0.1 verified Sat May 09 auth: no javascript abandoned
Provides the `build` command for Yahoo's Mojito CLI tool, used with the Mojito web application framework. This package is a plugin for `mojito-cli` and is part of the Mojito ecosystem. Version 0.0.1 is an early release. It requires Node.js >0.8 and npm >1.1. The package is currently work-in-progress and has limited documentation. It is specific to the Mojito framework, which is no longer actively maintained.
Common errors
error Error: Cannot find module 'mojito-cli' ↓
cause Missing peer dependency mojito-cli.
fix
npm install mojito-cli
error TypeError: cli.addCommand is not a function ↓
cause Incorrect usage; addCommand expects a command object.
fix
Ensure createBuildCommand() returns a valid command object.
error SyntaxError: Unexpected token import ↓
cause Using CommonJS require with an ESM-only package.
fix
Use import syntax or enable ESM in your project.
Warnings
deprecated Package is part of deprecated Mojito framework. ↓
fix Migrate to a supported web framework.
gotcha Requires mojito-cli as a peer dependency. ↓
fix Ensure mojito-cli is installed alongside.
gotcha Version 0.0.1 is unstable; API may change without notice. ↓
fix Pin exact version and monitor changes.
gotcha Only works with Node.js >0.8 and npm >1.1. ↓
fix Use older Node/npm versions or consider alternatives.
Install
npm install mojito-cli-build yarn add mojito-cli-build pnpm add mojito-cli-build Imports
- build wrong
const build = require('mojito-cli-build')correctimport build from 'mojito-cli-build' - Builder wrong
const Builder = require('mojito-cli-build').Buildercorrectimport { Builder } from 'mojito-cli-build' - createBuildCommand wrong
const createBuildCommand = require('mojito-cli-build').createBuildCommandcorrectimport { createBuildCommand } from 'mojito-cli-build'
Quickstart
import { createBuildCommand } from 'mojito-cli-build';
import { CLI } from 'mojito-cli';
const cli = new CLI();
cli.addCommand(createBuildCommand());
cli.run(process.argv);