Skip to content

Commit

Permalink
docs: spelling corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
majori committed Nov 8, 2024
1 parent 7bffe4d commit 9a07770
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 42 deletions.
22 changes: 11 additions & 11 deletions cmd/docs/templates/_schema.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
| `apiVersion` | `string` | `v1` | Version of the recipe metadata API schema. Currently should have value "v1". |
| `name` | `string` | | Name of the recipe. |
| `version` | `string` | | Version of the recipe. Must be valid [semver](https://semver.org/). |
| `description` | `string` | | Description of what the recipe does |
| `description` | `string` | | Description of what the recipe does. |
| `source` | `string` | | URL to source code for this recipe. |
| `templateExtension` | `string` | | File extension of files in "templates" directory which should be templated. Files not matched by this extension will be copied as-is. If left empty (the default), all files will be templated. |
| `initHelp` | `string` | | A message which will be showed to an user after a succesful recipe execution. Can be used to guide the user what should be done next in the project directory. Supports templating |
| `initHelp` | `string` | | A message which will be shown to an user after a successful recipe execution. Can be used to guide the user on what should be done next in the project directory. Supports templating. |
| `ignorePatterns` | `[]string` | | Glob patterns for ignoring generated files from future recipe upgrades. Ignored files will not be regenerated even if their templates change in future versions of the recipe. |
| `vars` | [`[]Variable`](#variable) | | An array of variables which can be used in templates. The user will be prompted to provide the value for the variable if not set with `--set` flag. |

Expand All @@ -21,16 +21,16 @@

| Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `name` | `string` | | The name of the variable. It is also used as unique identifier, so two variables can not have the same name. |
| `name` | `string` | | The name of the variable. It is also used as an unique identifier, so two variables cannot have the same name. |
| `description` | `string` | | Description of the variable. Will be shown to the user when "show help" is activated. |
| `default` | `string` | | Default value of the variable. |
| `confirm` | `bool` | `false` | If set to true, the prompt will be yes/no question, and the value type will be boolean. |
| `confirm` | `bool` | `false` | If set to true, the prompt will be a yes/no question, and the value type will be boolean. |
| `optional` | `bool` | `false` | If set to true, the variable can be left empty. |
| `options` | `[]string` | | The user selects the value from a list of options. |
| `multi` | `bool` | `false` | If set to true, the user can select multiple options defined by the `options` property. |
| `validators` | [`[]Validator`](#validator) | | Validators for the variable. |
| `if` | `string` | | Makes the variable conditional based on the result of the expression. The result of the evaluation needs to be a boolean value. Uses https://github.com/expr-lang/expr. |
| `columns` | `[]string` | | Set the variable as a table type with columns defined by this property. |
| `columns` | `[]string` | | Set the variable as a table type with columns defined by this property. |

### Validator

Expand All @@ -50,8 +50,8 @@
| Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `values` | `map[string]any` | | Values to use to render the recipe templates. Map key is the name of the variable and value is the variable value. |
| `expectedInitHelp` | `string` | | Expected initHelp of the recipe when rendered with the values specified in the test |
| `ignoreExtraFiles` | `bool` | | If true, test will pass even though templates generated more files than the test specifies. This is useful when creating specific test cases for large recipes. |
| `expectedInitHelp` | `string` | | Expected initHelp of the recipe when rendered with the values specified in the test. |
| `ignoreExtraFiles` | `bool` | | If true, the test will pass even though templates generated more files than the test specifies. This is useful when creating specific test cases for large recipes. |

## Sauce schema (`sauces.yml`)

Expand All @@ -61,9 +61,9 @@
| --- | --- | --- | --- |
| `apiVersion` | `string` | `v1` | Version of the sauce API schema. Currently should have value "v1". |
| `recipe` | [`Recipe`](#recipe-schema-recipeyml) | | The recipe which was used to render the sauce. |
| `values` | `map[string]any` | | Values which was used to execute the recipe. |
| `files` | `map[string]File` | | Files genereated from the recipe |
| `id` | `string` | | Random unique ID whose value is determined on first render and stays the same on subsequent re-renders (upgrades) of the sauce. Can be used for example as a seed for template random functions to provide same result on each template. |
| `values` | `map[string]any` | | Values which were used to execute the recipe. |
| `files` | `map[string]File` | | Files generated by the recipe. |
| `id` | `string` | | Random unique ID whose value is determined on first render and stays the same on subsequent re-renders (upgrades) of the sauce. Can be used for example as a seed for template random functions to provide the same result on each template. |
| `from` | `string` | | Defines the repository where updates should be checked for the recipe. |
| `subpath` | `string` | | Subpath which is used as a path prefix when saving and loading the sauce files. This is commonly used in monorepos. |

Expand All @@ -85,6 +85,6 @@
| `name` | `string` | | The name of the recipe. |
| `version` | `string` | | The version of the recipe. |
| `repository` | `string` | | The repository where the recipe is located. Can be a local path or remote URL. |
| `values` | `map[string]any` | | Values which was used to execute the recipe. |
| `values` | `map[string]any` | | Values which were used to execute the recipe. |

{{- end }}
14 changes: 7 additions & 7 deletions docs/site/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ winget upgrade jalapeno
Cross-platform binaries are provided with each release of Jalapeno. These can manually be
downloaded and installed from [GitHub releases](https://github.com/futurice/jalapeno/releases/).

In short the process is:
In short, the process is:

1. Download [the latest version of Jalapeno](https://github.com/futurice/jalapeno/releases/latest)
for your platform
2. Extract the archive
3. Make the binary executable
4. Rename and move the binary to proper location
4. Rename and move the binary to the proper location

For example on MacOS (running on Apple Silicon) this can be done with:
For example, on macOS (running on Apple Silicon) this can be done with:

```bash
curl -L https://github.com/futurice/jalapeno/releases/latest/download/jalapeno-darwin-arm64.tar.gz -o jalapeno.tar.gz
Expand All @@ -52,11 +52,11 @@ mv jalapeno /usr/local/bin/jalapeno

## Use via Docker

It is possible to use Jalapeno via Docker without installing it locally. Jalapeno image is available
It is possible to use Jalapeno via Docker without installing it locally. The Jalapeno image is available
from the GitHub Container Registry, and thus the following command on a \*nix system is equivalent
to running `jalapeno` locally:

```bash tab={"label":"MacOS and Linux"}
```bash tab={"label":"macOS and Linux"}
docker run -it --rm -v $(pwd):/workdir ghcr.io/futurice/jalapeno:latest
```

Expand All @@ -73,12 +73,12 @@ docker run -it --rm -v ${PWD}:/workdir ghcr.io/futurice/jalapeno:latest
First, make sure you have [Go](https://go.dev/doc/install) and
[Task](https://taskfile.dev/installation) installed.

Then you can compile the binary with following commands:
Then you can compile the binary with the following commands:

```bash
git clone https://github.com/futurice/jalapeno.git
cd jalapeno
task build
```

After this the binary is available on path `./bin/jalapeno`.
After this, the binary is available on the path `./bin/jalapeno`.
10 changes: 5 additions & 5 deletions docs/site/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ hide_title: true
<img src="img/logo.png" width="70%" />
</div>

Jalapeno is **a templating system** which support complex templating while staying user friendly. Templates used by Jalapeno are called _recipes_.
Jalapeno is **a templating system** which supports complex templating while staying user-friendly. Templates used by Jalapeno are called _recipes_.

To get started, [install](/installation) the tool and follow the [getting started](/usage#getting-started) guide.

## Features

- **Easy to use templates**: The CLI guides the user as much as possible when using recipes. This is done by prompting the user interactively for required template values, providing validation for the values, giving hints about what to do after executing the recipe etc.
- **Easy to use templates**: The CLI guides the user as much as possible when using recipes. This is done by prompting the user interactively for required template values, providing validation for the values, giving hints about what to do after executing the recipe, etc.
- **Modular**: A project can use multiple recipes at the same time, so you can compose your projects from multiple smaller template modules. This helps to keep the recipes simple and focused.
- **Continous integration**: Recipes are versioned, and new versions of the recipe can be merged to existing projects. Recipes can be shared via OCI compatible registries (aka container registries) so project CI/CD pipelines which already utilize the registry can easily check and notify the developers if there are new versions available for the recipes.
- **Tweakable templates**: Since every project is a little bit different, manual tweaks are often needed after a recipe has been executed. Jalapeno can still update the recipes used in a project by detecting which files has been manually edited and solve the merge conflicts. This way the project can stay up to date with the recipe, while still keeping the manual tweaks.
- **Snapshots tests**: Recipes can be tested with snapshot tests, which reduces regression when developing the templates by ensuring that the templates produces expected outputs.
- **Continuous integration**: Recipes are versioned, and new versions of the recipe can be merged into existing projects. Recipes can be shared via OCI compatible registries (aka container registries) so project CI/CD pipelines which already utilize the registry can easily check and notify the developers if there are new versions available for the recipes.
- **Tweakable templates**: Since every project is a little bit different, manual tweaks are often needed after a recipe has been executed. Jalapeno can still update the recipes used in a project by detecting which files have been manually edited and solving the merge conflicts. This way the project can stay up to date with the recipe, while still keeping the manual tweaks.
- **Snapshot tests**: Recipes can be tested with snapshot tests, which reduces regression when developing the templates by ensuring that the templates produce expected outputs.
Loading

0 comments on commit 9a07770

Please sign in to comment.