From ca045c280edaf7937adfe18cc048117a3fbd2dd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Kivim=C3=A4ki?= Date: Mon, 18 Dec 2023 13:46:16 +0200 Subject: [PATCH] Improve documentation --- docs/site/docs/api.md | 2 +- docs/site/docs/intro.md | 5 +++-- docs/site/docs/usage.md | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/site/docs/api.md b/docs/site/docs/api.md index 03316805..e818018b 100644 --- a/docs/site/docs/api.md +++ b/docs/site/docs/api.md @@ -1 +1 @@ - +**NOTE**: This file will be overridden by running `task docs:gen` before publishing the documentation. Do not manually edit this file. diff --git a/docs/site/docs/intro.md b/docs/site/docs/intro.md index 23a57d2c..cca7b503 100644 --- a/docs/site/docs/intro.md +++ b/docs/site/docs/intro.md @@ -10,7 +10,8 @@ Jalapeno is **a project templating system** which support complex templating whi ## Features +- **Easy to use**: The CLI guides the user as much as possible when using recipes. This is done by prompting the user [interactively](https://github.com/charmbracelet/bubbletea) for required template values, provides validation for the values, giving hints about what to do after executing the recipe etc. - **Modular**: Project can contain multiple recipes, so you can compose your projects from multiple smaller templates modules. - **Tool agnostic**: Recipes can define whatever tools to be used in the project, and Jalapeno related files can be ejected from the project at any time. -- **Continous integration**: Recipes are versioned, and new versions of the recipe can be merged to existing projects. Recipes can be shared via OCI compatible (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. -- **Snapshots tests**: Recipes can define snapshot tests, which reduces regression by ensuring that the templates produces expected outputs. +- **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. +- **Snapshots tests**: Recipes can define snapshot tests, which reduces regression when developing the templates by ensuring that the templates produces expected outputs. diff --git a/docs/site/docs/usage.md b/docs/site/docs/usage.md index 6b13c12b..5a729244 100644 --- a/docs/site/docs/usage.md +++ b/docs/site/docs/usage.md @@ -33,6 +33,11 @@ my-recipe The `templates` directory contains the templates which will be rendered to the project directory. You can add and edit files there or you can already _execute the recipe_ (render the templates) to your project directory by running: ```bash +mkdir my-project && cd my-project +jalapeno execute my-recipe + +# OR + mkdir my-project jalapeno execute my-recipe -d my-project ``` @@ -54,6 +59,16 @@ jalapeno execute oci://ghcr.io/futurice/jalapeno/examples/variable-types:v0.0.0 ::: +:::tip + +You can also set the values with `--set` flag when executing the recipe. For example: + +```bash +jalapeno execute my-recipe --set MY_VAR=foo +``` + +::: + After this, the project directory should have the following files: ```