Emulsify CLI is a TypeScript project that builds to the dist directory and publishes the emulsify binary from dist/index.js.
Use the Node.js version in .nvmrc, which should satisfy the package requirement of Node.js 24 or newer.
nvm use
npm install
npm run build
npm linkAfter npm link, run the local CLI:
emulsify --help| Path | Purpose |
|---|---|
src/index.ts |
Commander command composition and top-level error handling. |
src/handlers |
Command handlers for init, system, and component commands. |
src/handlers/hofs |
Shared handler wrappers, including progress and system-loading helpers. |
src/lib |
Logging, constants, and CLI error primitives. |
src/schemas |
JSON Schemas for project, system, and variant configuration. |
src/scripts |
Maintenance scripts, including schema type generation and develop version bumps. |
src/types |
Type modules. Generated schema types are prefixed with _. |
src/util |
Platform detection, cache utilities, filesystem helpers, component generation, and project config utilities. |
| Script | Purpose |
|---|---|
npm run build |
Generate schema types, compile TypeScript, copy package.json to dist, and install production dependencies in dist. |
npm run build-schema-types |
Generate TypeScript definitions from JSON Schema files. |
npm run build-ts |
Compile TypeScript with tsconfig.dist.json. |
npm run watch |
Rebuild when files in src change. |
npm run watch-ts |
Recompile TypeScript when files in src change. |
npm run format |
Run Prettier on source TypeScript and JavaScript files. |
npm run lint |
Runs the Jest test suite through npm run test. |
npm run test |
Run Jest with coverage. |
npm run type |
Run TypeScript checking without emitting files. |
npm run twatch |
Run Jest without coverage in watch mode. |
npm run version:develop |
Update package metadata from semantic commits on develop. |
npm run semantic-release |
Publish through semantic-release using release.config.cjs. |
Run one test file by passing the path after --:
npm run test -- src/handlers/componentCreate.test.tsSchema-derived type files live in src/types and are generated by:
npm run build-schema-typesRun this after changing files in src/schemas.
Before opening a PR, run:
npm run type
npm run build
npm run testnpm run build may report npm audit warnings from dependencies after the production install in dist; those warnings are not TypeScript build failures.