Usage
Korob CLI comes with a set of commands to work with typescript/javascript projects. It is designed to be as simple and straightforward as possible. Each of the command serves its own purpose however all of them share same prepare functionality.
Config generation
Korob aims to be environment-friendly and this is why it will create additional configuration files in order to properly work with the IDE/text editor of your choice:
- index.ts
Additionally make sure to add those files to .gitignore
. This is due to the fact that those files are created for the development purposes only.
Adding following files to ignore list is usually handled by korob init
but for the sake of manual installation here's the snippet:
# Korob
dist
.korob
.prettierrc.json
.prettierignore
biome.json
Editor integration
Korob was made to be used along with extensions for your favorite editor. Here's a list of recommended extensions:
- Biome VSCode (opens in a new tab) or JetBrains (opens in a new tab) extension for formatting and linting
- Prettier VSCode (opens in a new tab) or JetBrains (opens in a new tab) extension for fallback formatting
- Vitest VSCode (opens in a new tab) extension for testing
Commands
Besides the config generation there's, of course, more functionality for every command. Here's a short command description:
korob build
- Build the project into a bundle taking theconfig.build.entry
entry pathkorob dev
- Start a development server with hot reloadingkorob format
- Format the project using biome and prettier as fallbackkorob init
- Initialize existing workspacekorob lint
- Lint the project using biome and prettier as fallbackkorob start [PATH]
- Execute javascript/typescript filekorob test
- Test all *.test.js/ts files via vitest
For more information on commands, head to the corresponding commands section:
None of the CLI commands but korob start
take arguments. This is because the CLI is designed to be as
simple as possible. The only source of configuration is "korob"
key in package.json
or
korob.config.js
/korob.config.ts
.