You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: cmd/docs/templates/_schema.tmpl
+11-11
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,10 @@
8
8
| `apiVersion` | `string` | `v1` | Version of the recipe metadata API schema. Currently should have value "v1". |
9
9
| `name` | `string` | | Name of the recipe. |
10
10
| `version` | `string` | | Version of the recipe. Must be valid [semver](https://semver.org/). |
11
-
| `description` | `string` | | Description of what the recipe does |
11
+
| `description` | `string` | | Description of what the recipe does. |
12
12
| `source` | `string` | | URL to source code for this recipe. |
13
13
| `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. |
14
-
| `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 |
14
+
| `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. |
15
15
| `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. |
16
16
| `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. |
17
17
@@ -21,16 +21,16 @@
21
21
22
22
| Attribute | Type | Default | Description |
23
23
| --- | --- | --- | --- |
24
-
| `name` | `string` | | The name of the variable. It is also used as unique identifier, so two variables can not have the same name. |
24
+
| `name` | `string` | | The name of the variable. It is also used as an unique identifier, so two variables cannot have the same name. |
25
25
| `description` | `string` | | Description of the variable. Will be shown to the user when "show help" is activated. |
26
26
| `default` | `string` | | Default value of the variable. |
27
-
| `confirm` | `bool` | `false` | If set to true, the prompt will be yes/no question, and the value type will be boolean. |
27
+
| `confirm` | `bool` | `false` | If set to true, the prompt will be a yes/no question, and the value type will be boolean. |
28
28
| `optional` | `bool` | `false` | If set to true, the variable can be left empty. |
29
29
| `options` | `[]string` | | The user selects the value from a list of options. |
30
30
| `multi` | `bool` | `false` | If set to true, the user can select multiple options defined by the `options` property. |
31
31
| `validators` | [`[]Validator`](#validator) | | Validators for the variable. |
32
32
| `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. |
33
-
| `columns` | `[]string` | | Set the variable as a table type with columns defined by this property. |
33
+
| `columns` | `[]string` | | Set the variable as a table type with columns defined by this property. |
34
34
35
35
### Validator
36
36
@@ -50,8 +50,8 @@
50
50
| Attribute | Type | Default | Description |
51
51
| --- | --- | --- | --- |
52
52
| `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. |
53
-
| `expectedInitHelp` | `string` | | Expected initHelp of the recipe when rendered with the values specified in the test |
54
-
| `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. |
53
+
| `expectedInitHelp` | `string` | | Expected initHelp of the recipe when rendered with the values specified in the test. |
54
+
| `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. |
55
55
56
56
## Sauce schema (`sauces.yml`)
57
57
@@ -61,9 +61,9 @@
61
61
| --- | --- | --- | --- |
62
62
| `apiVersion` | `string` | `v1` | Version of the sauce API schema. Currently should have value "v1". |
63
63
| `recipe` | [`Recipe`](#recipe-schema-recipeyml) | | The recipe which was used to render the sauce. |
64
-
| `values` | `map[string]any` | | Values which was used to execute the recipe. |
65
-
| `files` | `map[string]File` | | Files genereated from the recipe |
66
-
| `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. |
64
+
| `values` | `map[string]any` | | Values which were used to execute the recipe. |
65
+
| `files` | `map[string]File` | | Files generated by the recipe. |
66
+
| `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. |
67
67
| `from` | `string` | | Defines the repository where updates should be checked for the recipe. |
68
68
| `subpath` | `string` | | Subpath which is used as a path prefix when saving and loading the sauce files. This is commonly used in monorepos. |
69
69
@@ -85,6 +85,6 @@
85
85
| `name` | `string` | | The name of the recipe. |
86
86
| `version` | `string` | | The version of the recipe. |
87
87
| `repository` | `string` | | The repository where the recipe is located. Can be a local path or remote URL. |
88
-
| `values` | `map[string]any` | | Values which was used to execute the recipe. |
88
+
| `values` | `map[string]any` | | Values which were used to execute the recipe. |
Copy file name to clipboardexpand all lines: docs/site/docs/intro.mdx
+5-5
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,14 @@ hide_title: true
9
9
<imgsrc="img/logo.png"width="70%" />
10
10
</div>
11
11
12
-
Jalapeno is **a templating system** which support complex templating while staying userfriendly. Templates used by Jalapeno are called _recipes_.
12
+
Jalapeno is **a templating system** which supports complex templating while staying user-friendly. Templates used by Jalapeno are called _recipes_.
13
13
14
14
To get started, [install](/installation) the tool and follow the [getting started](/usage#getting-started) guide.
15
15
16
16
## Features
17
17
18
-
-**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.
18
+
-**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.
19
19
-**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.
20
-
-**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.
21
-
-**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.
22
-
-**Snapshots tests**: Recipes can be tested with snapshot tests, which reduces regression when developing the templates by ensuring that the templates produces expected outputs.
20
+
-**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.
21
+
-**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.
22
+
-**Snapshot tests**: Recipes can be tested with snapshot tests, which reduces regression when developing the templates by ensuring that the templates produce expected outputs.
0 commit comments