Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global location for maid file #4

Open
jakepearson opened this issue May 31, 2018 · 8 comments · May be fixed by #37
Open

Global location for maid file #4

jakepearson opened this issue May 31, 2018 · 8 comments · May be fixed by #37

Comments

@jakepearson
Copy link
Collaborator

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

@egoist
Copy link
Owner

egoist commented May 31, 2018

that's neat but I'm afraid that it will cause confusion.

@jakepearson
Copy link
Collaborator Author

Potentially, but it also means I could create a set of scripts that I could use from anywhere in my system.

@egoist
Copy link
Owner

egoist commented May 31, 2018

what about something like maid global build which will run build task from the maidfile in user's home dir 🤔

@gthole
Copy link

gthole commented May 31, 2018

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.

@jakepearson
Copy link
Collaborator Author

I like @gthole idea even better. Just look up a directory until you find a maid file or give up at the home directory.

@tunnckoCore
Copy link
Contributor

tunnckoCore commented Jun 4, 2018

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.

@tunnckoCore
Copy link
Contributor

tunnckoCore commented Jun 5, 2018

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.

tunnckoCore referenced this issue in tunnckoCore/maid Jun 6, 2018
- rewrite resolving mechanism
- add `yarn maid` script
- add implementations of egoist#36
- replace occurances pf `node bin/cli` with `yarn maid` because it uses the --maidfile flag

Signed-off-by: Charlike Mike Reagent <[email protected]>
@tunnckoCore tunnckoCore linked a pull request Jun 6, 2018 that will close this issue
@tunnckoCore
Copy link
Contributor

tunnckoCore commented Jun 6, 2018

Implemented in #37. If merged you can add ~/.maidfile.md and just start using maid without passing any flags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants