Skip to content

Commit

Permalink
docs: add docs for installation and first usage
Browse files Browse the repository at this point in the history
  • Loading branch information
radiovisual committed Oct 20, 2024
1 parent 1ba4bcd commit 03ffe9a
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,48 @@ Keeli will help you automatically discover many problems with your translation f

Most of these rules are configurable so you can customize keeli to your specific needs.

## Global Installation

If you want the `keeli` command to be globally available on your system, you can install it globally:

```bash
npm install --global keeli
```

And then you have the `keeli` command in your terminal. Now you are ready to [configure Keeli for your first validation check](#configuration)

## Project Installation

If you don't need the `keeli` command to be available globally on your system, then you can install Keeli into your project directly as a `devDependency` using the package manager of your choice:

**npm**

```
npm install --save-dev keeli
```

**yarn**

```
yarn add keeli --D
```

**pnpm**

```
pnpm add keeli --save-dev
```

Then you can use the `keeli` command in your package,json scripts, for example: `"validate-i18n": "keeli"`

## Configuration

For each project where you want to run the keeli, you will need to have a file named `keeli.config.json` with the following format:
For each project where you want to run the keeli, you will need to have a file named `keeli.config.json` in the project root where your internationalization files are defined.

> [!TIP]
> You can also pass in a custom configuration file path location with keeli's `--config` option.
Each configuration file should be a valid JSON file and have a similar format to this (with comments removed):

```json5
{
Expand Down Expand Up @@ -114,6 +153,9 @@ For each project where you want to run the keeli, you will need to have a file n
}
```

> [!TIP]
> Your configuration file does need to be complete, if you do not specify a value for any parameter that is not required, then the default configuration value will apply. If you forget to provide a value for a required value, then keeli will throw a useful error.
# Rule Defaults

Each rule (that allows you to configure the severity) can have a default setting of `error`, `warn` or `off`, these defaults will apply if you do not provide a configuration for the rule in the configuration file.
Expand Down

0 comments on commit 03ffe9a

Please sign in to comment.