maid
maid copied to clipboard
Better config resolving
resolves #4 and deprecates #36 and #29 ;d
So what is the final result? There is a comment, but let's describe again.
If someone want one global config file they don't need to do anything or to use a --maidfile
flag - it just works. It will look 5-10 directories up to find such file, otherwise you should pass path to a markdown file (e.g. README.md
or ~/myconfigs/maidconfig.md
) which has h2 header and tasks names as h3 headers, the optional use of <!-- maid-tasks -->
still work though.
Btw, last commit may look strange, but is required and this problem probably comes from the cac
that. Without that change, it was passing the README.md
to all tasks.
you can see here how there is .bin/eslint . README.md lint
and node_modules/.bin/ava README.md test
that's what i'm talking in #35 and how it may be a problem. Think for example if some of the CLI has lint
command too, what we should do then?
❯ yarn test
yarn run v1.7.0
$ yarn maid lint && yarn maid test
$ node bin/cli --maidfile README.md lint
[11:32:07] Starting 'lint'...
$ /home/charlike/tunnckoCore/maid/node_modules/.bin/eslint . README.md lint
[11:32:10] Finished 'lint' after 2318 ms...
$ node bin/cli --maidfile README.md test
[11:32:11] Starting 'test'...
$ /home/charlike/tunnckoCore/maid/node_modules/.bin/ava README.md test
5 passed
[11:32:12] Finished 'test' after 1703 ms...
Done in 6.04s.
Definitely this should somehow be handled by cac
. Should pass them after --
? So to be eslint . -- README.md lint
and only pass the flags passed to maid
before the --
?
Like for example running lint task
maid lint --fix
should represent
eslint . --fix -- README.md lint
?
That's why #35 is reasonable and mostly sure it may appear as problem in future, and users should be caution when use maid
.
TODO: update docs.
@tunnckoCore, I have access to start merging, would you fix the conflicts and I will merge today. Thanks.