Skip to main content

πŸš€ Getting Started

Welcome to mostir β€” a lightweight CLI to streamline esbuild workflows.


πŸ“¦ Installation​

Install with your preferred package manager:

npm install -D mostir
# or
yarn add -D mostir
# or
pnpm add -D mostir

πŸš€ Quick Start​

Initialize a config file:

mostir init
  • This will generate a mostir.config.mjs in your project root.
  • The build section in mostir.config.mjs follows esbuild options.
  • ⚠️ In the init-generated mostir.config.mjs, if you want to build with bundle: false, you should remove the external option.

πŸ‘‰ Review and adjust the settings before running build, or it may fail.

Run your first build:

mostir build

🧹 Useful Commands​

  • mostir build --sync β†’ Sync dist dir with source dir first ,then run esbuild with your config
  • mostir sync β†’ Sync dist dir with source dir (remove orphan files)
  • mostir clean β†’ Clear all files inside dist dir

For more details and available options, see the Commands section.