From c940075565d89c72c5d0114bc88e00133145f8be Mon Sep 17 00:00:00 2001 From: Yvonnick FRIN Date: Tue, 7 Jan 2020 09:15:15 +0100 Subject: [PATCH] :pencil: Add documentation about generic preset (#163) --- DOCUMENTATION.md | 1 + README.md | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 9aa21a9..d81d753 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -83,6 +83,7 @@ _This workflow is related to the `node` preset but can be adapted to your own te `gitmoji-changelog` use presets to get project meta data useful for its smooth operation. Here is the list of available presets: - node (default preset) +- generic You didn't the preset you need in the list? Consider adding it. Presets are stored in a [presets](packages/gitmoji-changelog-cli/src/presets) folder in the `cli` package. diff --git a/README.md b/README.md index 8a59757..0c9167d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ gitmoji-changelog 2.0 in a nutshell: Make sure you have [npx](https://www.npmjs.com/package/npx) installed (`npx` is shipped by default since npm `5.2.0`) -Run the following command at the root of your project and answer questions. +Run the following command at the root of your project and answer questions. `gitmoji-changelog` uses a [preset system](/DOCUMENTATION.md#presets) to handle different type of project. The preset used by default is the Node.js one that look for project's information in the `package.json` file. with npx: ```sh @@ -47,6 +47,25 @@ cd my-project gitmoji-changelog ``` +It exists a generic preset that works for every kind of project. It looks for information in a `.gitmoji-changelogrc` file at the root of your project. This file must contain three mandatory properties: `name`, `description` and `version`. + +.gitmoji-changelogrc: +```json +{ + "project": { + "name": "gitmoji-changelog", + "description": "A changelog generator for gitmoji 😜", + "version": "2.0.1" + } +} +``` + +You can change the preset used by `gitmoji-changelog` with the preset option. + +```sh +npx gitmoji-changelog --preset generic +``` + ## 📖 Documentation :point_right: The full documentation is available [here](DOCUMENTATION.md).