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: .github/ISSUE_TEMPLATE/recipe-request.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,14 @@ about: Request a recipe be added this repo
4
4
title: ''
5
5
labels: recipe-request
6
6
assignees: ''
7
-
8
7
---
9
8
9
+
<!---
10
+
Before you submit this recipe request, check if there are any duplicate ["Recipe Request" issues](https://github.com/JordanMartinez/purescript-cookbook/issues?q=is%3Aissue+is%3Aopen+label%3Arecipe-request) or [PRs](https://github.com/JordanMartinez/purescript-cookbook/pulls).
11
+
12
+
If you'd like to work on implementing this recipe, assign yourself and let us know when to check back in to make sure it's not abandoned.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,27 +8,29 @@ Follow these instructions for contributing new recipes. The Goal headers indicat
8
8
9
9
#### Goal 1: Claim and Start Working on a Recipe Request
10
10
11
-
1. Search currently open "Recipe Request" issues. If there isn't one for your recipe, open a new "Recipe Request" issue for it. This is where you'll find the "Unique Recipe Name" (i.e. short description of the problem using PascalCase, such as "HelloWorld")
12
-
1.State on the issue that you'll be implementing the recipe and how long we should wait before following up with you if you haven't finished it yet. If you do not post this, we will assume that you will have it done within two weeks.
13
-
- This helps avoid two issues. First, it prevents two developers from working on the same recipe independently. Second, one developer who wants to implement the recipe may think someone else who has started work on it and then abandoned it is still working on it.
11
+
1. Search currently [open "Recipe Request" issues](https://github.com/JordanMartinez/purescript-cookbook/issues?q=is%3Aissue+is%3Aopen+label%3Arecipe-request).
12
+
1.If your recipe idea is unique, open a new ["Recipe Request" issue](https://github.com/JordanMartinez/purescript-cookbook/issues/new?assignees=&labels=recipe-request&template=recipe-request.md&title=)
13
+
1. Proceed to the next step if you'd like to implement this recipe yourself.
14
14
15
15
#### Goal 2: Setup a New Recipe's Boilerplate by Copying a Current Similar One
16
16
17
-
1. Pick an existing recipe to duplicate as a starting point. The `HelloWorld` recipe is the simplest and is set up to work on both Node.js and Browser backends.
18
-
- In the examples that follow, we'll assume that you copied the `HelloWorld` recipe and wish to use the "Unique Recipe Name" of `MyNewRecipe`
17
+
1. Pick an existing recipe to duplicate as a starting point. The `HelloLog` recipe is the simplest and is set up to work on both Node.js and Browser backends.
18
+
- In the examples that follow, we'll assume that you copied the `HelloLog` recipe and wish to use the "Unique Recipe Name" of `MyNewRecipe`
19
+
```
20
+
cd recipes
21
+
cp -r HelloLog MyNewRecipe
22
+
```
19
23
1. Rename the copied folder to the "Unique Recipe Name" assigned in the original issue.
20
24
1. Depending on the backend-compatibility of your recipe, follow the instructions below:
21
-
1. If your recipe is incompatible with the browser enviornment, delete the `web` directory.
25
+
1. If your recipe is incompatible with the browser environment, delete the `web` directory.
22
26
- If your recipe uses `node-*` libraries, it is incompatible with the browser.
23
27
- Logging to the console **is** supported in the browser.
24
28
1. If your recipe is incompatible with the Node.js backend, delete the `nodeSupported.md` file.
25
29
1. If your recipe is compatible with Node.js, but the resulting program should not be run during CI (e.g. a program that parses command-line arguments), then rename `nodeSupported.md` to `nodeSupportedSkipCI.md`.
26
-
1. Replace all usages of the original recipe's "Unique Recipe Name" with your recipe's "Unique Recipe Name." To find all instances, `cd` into your recipe folder and run `grep -r <originalUniqueRecipeName>`. For example, `HelloWorld` would be replaced with `MyNewRecipe` in the following files (as of this writing):
27
-
-`recipes/MyNewRecipe/spago.dhall`
28
-
-`recipes/MyNewRecipe/README.md`
29
-
-`recipes/MyNewRecipe/src/Main.purs`
30
-
-`recipes/MyNewRecipe/web/index.html`
31
-
-`recipes/MyNewRecipe/web/index.js`
30
+
1. Replace all usages of the original recipe's name with your new recipe's name. For example:
31
+
```
32
+
grep -rl 'HelloLog' MyNewRecipe | xargs sed -i 's/HelloLog/MyNewRecipe/g'
33
+
```
32
34
33
35
#### Goal 3: Implement and Submit the Recipe
34
36
@@ -38,15 +40,15 @@ Follow these instructions for contributing new recipes. The Goal headers indicat
38
40
1. Change directory into your recipe folder: `cd recipes/MyRecipeName`
39
41
1. Install dependencies as normal: `spago install <packageName>`
40
42
1. Return to the root directory: `cd ../..`
41
-
-**Note**: you can only install dependencies that exist in the latest package set release; you cannot add or override packages in `packages.dhall` (see Principles section for more contxt).
43
+
- **Note**: you can only install dependencies that exist in the latest package set release; you cannot add or override packages in `packages.dhall` (see Principles section for more context).
42
44
1. Install needed `npm` dependencies via `npm i <packageName>`. These will be installed to the root folder's `node_modules` folder, not a corresponding folder in the recipe.
43
45
- If you do install `npm` dependencies for your recipe, please state which libraries were installed in the recipe's `README.md` file.
44
46
1. Implement your recipe. If you add any new modules, always start the module name with your recipe's "Unique Recipe Name" (e.g. `MyNewRecipe.Foo`, `MyNewRecipe.Module.Path.To.Cool.Types`)
45
-
- Run `spago -x recipes/MyNewRecipe/spago.dhall build -w` while in the root folder for faster iteration while developing
47
+
- Run `make MyNewRecipe-build-watch` while in the root folder if you'd like to automatically rebuild recipes upon changes.
46
48
1. Update your recipe's `README.md` file by doing the following things:
47
-
1. Write a full sumary of your recipe on the 3rd line (i.e. don't use any newlines). This is what will appear in the repo's Recipe section's Table of Contents.
49
+
1. Write a summary of your recipe on the 3rd line. This is what will appear in the repo's Recipe section's Table of Contents. Don't add newlines unless you're okay with that additional content being omitted from the table.
48
50
1. Update the "Expected Behavior" section to describe in more detail what should occur when users run your recipe.
49
-
1. Link to any other resources that a reader might find helpful. Do not explain things further.
51
+
1. Link to any other resources that a reader might find helpful. No need for detailed explanations of libraries here.
50
52
1. List the `npm` dependencies your recipe uses (if any).
51
53
1. Regenerate the table of recipes by running `make readme` while in the root folder
52
54
1. Submit a PR. The first line should read `Fixes #X` where `X` refers to the original "Recipe Request" issue you claimed.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,8 +111,8 @@ Running a web-compatible recipe:
111
111
||:heavy_check_mark:|[GroceriesReactHooks](recipes/GroceriesReactHooks)| A React port of the ["HTML - Groceries" Elm Example](https://elm-lang.org/examples/groceries). |
112
112
||:heavy_check_mark:|[HelloConcur](recipes/HelloConcur)| A Concur port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples/hello). |
113
113
||:heavy_check_mark:|[HelloHalogenHooks](recipes/HelloHalogenHooks)| A Halogen port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples/hello). |
114
+
|:heavy_check_mark:|:heavy_check_mark:|[HelloLog](recipes/HelloLog)| This recipe shows how to run a simple "Hello world!" program in either the node.js or web browser console. |
114
115
||:heavy_check_mark:|[HelloReactHooks](recipes/HelloReactHooks)| A React port of the ["HTML - Hello" Elm Example](https://elm-lang.org/examples/hello). |
115
-
|:heavy_check_mark:|:heavy_check_mark:|[HelloWorldLog](recipes/HelloWorldLog)| This recipe shows how to run a simple "Hello world!" program in either the node.js or web browser console. |
116
116
|:heavy_check_mark:|:heavy_check_mark:|[HeterogenousArrayLog](recipes/HeterogenousArrayLog)| This recipe demonstrates how to create a heterogenous array and process its elements. |
117
117
||:heavy_check_mark:|[ImagePreviewsHalogenHooks](recipes/ImagePreviewsHalogenHooks)| A Halogen port of the ["Files - Drag-and-Drop" Elm Example](https://elm-lang.org/examples/drag-and-drop). |
118
118
||:heavy_check_mark:|[InterpretHalogenHooks](recipes/InterpretHalogenHooks)| Demonstrates how to use a custom monad (in this case, using `ReaderT` with `Aff` as the effect type) for a component, and then interpreting that custom monad back down to `Aff`, so it can be run as a normal component. |
0 commit comments