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

Passing flags to the tasks is conflicting #35

Open
tunnckoCore opened this issue Jun 6, 2018 · 4 comments
Open

Passing flags to the tasks is conflicting #35

tunnckoCore opened this issue Jun 6, 2018 · 4 comments

Comments

@tunnckoCore
Copy link
Contributor

So.

While implementing #4, i reconsider the #29. And realized that we only should support maidfile.md (from cwd to 5 dirs up) and .maidfile.md (from cwd to 10 dirs up) by default. One more thing that appeared is that we are a bit limited with what flags maid cli can have, because we are passing flags to the tasks e.g. maid lint --fix, so --fix is going to the eslint. I realized that is a bit conflicting while i changed the --path to more meaningful --config-path which ESLint has too.

So, if not another thing, we can rename the --path to, for example, --maidfile which would be the best. Then i can PR the #4 which is pretty fantastic by the way and works.

This issue is more just informatinve and opening the discussion that may appear in future.

@tunnckoCore
Copy link
Contributor Author

tunnckoCore commented Jun 6, 2018

We definitely should have as low flags as possible. One more conflict may appear if you have bash task using git and you also want to pass the alias flag of --section which is -s and git also have -s which i extensively use always. Or at least all of this should be mentioned in comments.

@DJMcNab
Copy link
Contributor

DJMcNab commented Jun 7, 2018

Could this work using the -- <flags to run task with> syntax instead, maybe automatically passing unknown flags at the top level into the task (with a warning).

@egoist
Copy link
Owner

egoist commented Jun 7, 2018

-- task arguments seems the best solution so far.

@egoist
Copy link
Owner

egoist commented Jun 7, 2018

Or treat flags before task name as maid flags, but treat arguments after the task name as task arguments:

maid --section foo lint --fix

This is also how npx and yarn work. -- task arguments is kinda annoying 😅

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

No branches or pull requests

3 participants