Skip to content
Getting startedInstall

Install

Add Mokly to the repository that holds the components your screens are made of.

Install the package

Mokly runs from your own repository as a development dependency. React and React DOM render your screens, so install them beside it.

shell
npm install --save-dev @mokly/mokly react react-dom

The package is @mokly/mokly and its executable is mokly. This documentation describes version 0.11.0.

Run the command

Run the local executable with npx. In a repository that has Mokly as a development dependency, --no-install keeps npm from reaching the registry.

shell
npx --no-install mokly --version

On a machine without the dependency you can run one published release directly:

shell
npx --package @mokly/mokly mokly --help

Pin a version

To reproduce one exact release, on another machine or in a job, install the version rather than the range:

shell
npm install --save-dev @mokly/[email protected]

What you need

  • Node.js 22.14 or newer.
  • A repository with React components, or somewhere to write new ones.
  • Git, once you want to compare a branch with its base.

Next

Create the configuration that tells Mokly where your screens live and where the catalogue is written.