maid
maid copied to clipboard
Global location for maid file
If there is not a maidfile.md in the current directory then look in the user's root for a file something like .maidfile.md
that's neat but I'm afraid that it will cause confusion.
Potentially, but it also means I could create a set of scripts that I could use from anywhere in my system.
what about something like maid global build which will run build task from the maidfile in user's home dir 🤔
This is a pretty common convention. Hashicorp's vagrant and docker-compose will scan down each of the parent directories of the current directory to find its manifest (Vagrantfile and docker-compose.yml respectively), presumably halting at the user's home directory.
I like @gthole idea even better. Just look up a directory until you find a maid file or give up at the home directory.
I'm against maid global, try to not pollute tasks namespace as much as possible, and also this will allow calling multiple commands/tasks (like gulp) in series/parallel (btw would be flags).
As about searching, https://github.com/jonschlinkert/find-file-up (with the limit set) is the way to go, definitely. This approach has one more bonus - make maid work for monorepos.
Even best would be to drop support for other files and support only .?maidfile.md from cwd to home - by that i mean it still will be able to define --path README.md or --path CONTRIBUTING.md though :) I like that it allows to use README.md, but it may complicate the things exactly because it is common file.
Actually i'm playing with some implementations and may pr if i've done something.
Implemented in #37. If merged you can add ~/.maidfile.md and just start using maid without passing any flags.