purescript-cookbook
                                
                                 purescript-cookbook copied to clipboard
                                
                                    purescript-cookbook copied to clipboard
                            
                            
                            
                        Add make -help commands
Show all available commands for a recipe with something like:
make MyRecipeName-help
Planning to pull out the command-printing code from scripts/newRecipe.sh into a scripts/showHelp.sh, and call this new script from both the original newRecipe.sh script and the makefile.
To clarify, I thought the command would just be make help, not make RecipeName-help. What happens if you forget what the recipe was called / the recipe name you chose?
If you don't specify the recipe name, then we won't be able to provide copy-pastable make commands (which need to have the recipe name in them). So we could provide a command reference with a generic MyRecipeName placeholder, or just show the suffixes, but then we'll likely be showing some invalid commands. The existing scripts/newRecipe.sh customizes the displayed commands based on recipe type, for example whether to show -node or -web, etc.
We could do something tricky to guess what recipe they need help with, such as looking for the newest recipe directory. But I think it's better to just require the recipe name.
What happens if you forget what the recipe was called / the recipe name you chose?
I feel like this is unlikely, since you have at least 3 ways to figure this out:
- check command history
- check git status
- sort recipes by date: ls -lrt recipes
Good points. Thanks for your feedback.
Perhaps this problem could be resolved differently. When we run make or make list, we could update the output to say:
Run `make <RecipeName>-<target>` run a recipe named `RecipeName` via the target, `target`.
Run `make <RecipeName>-help` to see a list of all copy-and-paste commands 
for a given recipe. For example `make HelloWorld-help`.
=== Node Recipes ===
...
That would solve the "general help" message people would see while still making the "specific help" message better.
Yes, that sounds good. Although the the make/make list output is pretty long now, so I don't think users will see a note at the top. Maybe we put it at the bottom.
Yeah, bottom sounds like a better idea.