@omni-door/cli
Version:
A tool set for set up the standard JS project
41 lines (34 loc) • 2.07 kB
Markdown
# Repository Guidelines
## Project Structure & Module Organization
This is a TypeScript-based CLI. Key locations:
- `src/` contains TypeScript source, organized by `commands/` and shared `utils/`.
- `src/**/__test__/` holds Mocha tests (e.g., `src/commands/dev/__test__/index.test.ts`).
- `bin/` contains the published CLI entry (`omni-door.js`).
- `lib/` is the compiled output (generated by `npm run build`).
- `docs/` includes usage and configuration docs (see `docs/OMNI.md`).
- `scripts/` holds build and release helper scripts.
## Build, Test, and Development Commands
- `npm test`: run Mocha tests with NYC coverage (`mocha.opts` + `ts-node/register`).
- `npm run lint`: lint `src/` with ESLint and TypeScript rules.
- `npm run lint:fix`: auto-fix lint issues in `src/`.
- `npm run build`: clean and compile TypeScript to `lib/`, then copy assets.
- `npm run release`: prepare a release (branch check + build + version script).
## Coding Style & Naming Conventions
- TypeScript with strict mode enabled (`tsconfig.json`).
- Indentation: 2 spaces; quotes: single; semicolons required (`.eslintrc.js`).
- Avoid `console.log`; only `console.warn`, `console.error`, `console.info` are allowed.
- Test files use `index.test.ts` under `__test__/` directories.
## Testing Guidelines
- Frameworks: Mocha + Chai, executed via NYC for coverage.
- Tests live alongside commands/utilities in `src/**/__test__/`.
- Run full suite with `npm test`; keep new tests colocated with the code they cover.
## Commit & Pull Request Guidelines
- Commit messages follow commitlint + Commitizen conventions. Examples from history:
- `fix(omni build): rollup config`
- `🐸 [OMNI-DOOR/CLI]: 3.1.1`
- Allowed types include `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `perf`, etc.
- PRs should include: a short summary, linked issues (if any), and test evidence
(e.g., `npm test` output) when behavior changes.
## Configuration & Compatibility
- Node.js >= 10.13.0 is recommended (see README).
- CLI behavior is configured via `omni.config.js`; reference `docs/OMNI.md`.