aboutsummaryrefslogtreecommitdiffstats
path: root/docs/updating.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/updating.md')
-rw-r--r--docs/updating.md36
1 files changed, 8 insertions, 28 deletions
diff --git a/docs/updating.md b/docs/updating.md
index ac2e126..000b362 100644
--- a/docs/updating.md
+++ b/docs/updating.md
@@ -2,16 +2,6 @@
2 2
3If you want to improve or update an existing recipe, please follow this guide. 3If you want to improve or update an existing recipe, please follow this guide.
4 4
5Please **do not** simply change files inside `uncompressed` - Ferdi only uses the packaged archives, the uncompressed files are only to improve accessibility of the repository.
6
7## 0. Find the recipe ID of the recipe you want to update
8
9Before you can start updating the recipe, you'll need to know its internal ID. The ID is a string of lowercase letters and hyphens that Ferdi uses to store and manage them.
10
11To find the recipe ID, you can search <https://github.com/getferdi/recipes/blob/master/all.json> for the recipe you want to edit.
12
13In the rest of this guide, always replace "&lt;recipe id>" with the ID of the recipe you want to edit.
14
15## 1. Implement your updates 5## 1. Implement your updates
16 6
17We highly suggest that you implement and test your updates to the recipe inside Ferdi before implementing them into the recipe repository. This will save you time on debugging and repackaging the recipe later. 7We highly suggest that you implement and test your updates to the recipe inside Ferdi before implementing them into the recipe repository. This will save you time on debugging and repackaging the recipe later.
@@ -21,32 +11,22 @@ You can find the recipe source Ferdi uses at:
21 * Windows: `%appdata%/Ferdi/recipes/<recipe id>/` 11 * Windows: `%appdata%/Ferdi/recipes/<recipe id>/`
22 * Linux: `~/.config/Ferdi/recipes/<recipe id>` 12 * Linux: `~/.config/Ferdi/recipes/<recipe id>`
23 13
14> If you can't find the recipe's folder, please make sure that you have created a service inside Ferdi with that recipe - otherwise Ferdi will not load it into the folder
15
24After changing the files in that folder, you can reload the service inside Ferdi using `CTRL/CMD + R`. 16After changing the files in that folder, you can reload the service inside Ferdi using `CTRL/CMD + R`.
25 17
26## 2. Setting up the recipe repository 18## 2. Setting up the recipe repository
27 19
28- Fork https://github.com/getferdi/recipes and clone it to your computer 20Simply fork https://github.com/getferdi/recipes. You may also want to clone the repository to your computer to edit it locally.
29- Open a terminal in the `scripts/` folder of that repository
30- Run `npm install` to install all dependencies
31
32This will setup the repository so that you can work on updating it.
33 21
34## 3. Loading and updating the recipe 22## 3. Updating the recipe inside the repository
35 23
36Again, please **do not** edit any of the files located inside the `uncompressed` folder! Before editing, you'll need to "load" the recipe you want to edit using 24Simply add your changes to the recipe inside this repository.
37```JavaScript
38npm run load <recipe id>
39```
40(e.g. `npm run load gmail`)
41
42Your recipe is now loaded into `scripts/recipe_src`. You can now make changes to the files **in that folder*.
43 25
44## 4. Updating the version number 26## 4. Updating the version number
45 27
46In order for Ferdi to update its recipe, you'll need to bump its version number. Increase the `version` inside `scripts/recipe_src/package.json`. 28This might be the __most important step__ of this guide. You'll need to increase the version number inside recipe's `package.json`.
47
48## 5. Re-packaging the recipe
49 29
50You can now run `npm run package` to repackage your updated files. Your changes will be automatically copied into the recipe source at `uncompressed` and compressed into `archives/<recipe id>.tar.gz` - no need to update anything manually! 30Ferdi uses this version to determine if it should update the local copy of the recipe. If you do not increase the version number, no Ferdi user will get your updated recipe 😔
51 31
52## 6. Commit your changes and create a PR to <https://github.com/getferdi/recipes> 32## 5. Commit your changes and create a PR to <https://github.com/getferdi/recipes>