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

Can only run CLI when on app root #3

Open
sungwoncho opened this issue Feb 21, 2016 · 4 comments
Open

Can only run CLI when on app root #3

sungwoncho opened this issue Feb 21, 2016 · 4 comments

Comments

@sungwoncho
Copy link

CLI assumes that you are on the app root directory.

possible solutions

  • ~/.mantrarc file to keep paths to all apps generated by CLI. Add command to register/deregister apps
  • Make users set env variable MANTRA_ROOT before using CLI. Maybe add a command to do so.
  • Walk up the directory until it finds .meteor directory and execute command

Suggestions welcomed.

@JackAdams
Copy link

I like the walk up the directory idea. Then as long as you're somewhere in a Meteor project it just works, with zero extra config.

@andreyantipov
Copy link

I'd like to propose a fourth way. Create .mantra directory in the root of application and walk.

Pros.

  • It's extensible and also allow to add mantra config or something else (for example custom scaffolding templates, for additional coherence logic)
  • Like .mantrarc can say that is already mantra project, to avoid possible circumstances
  • Walk up the directory until it finds .meteor or .mantra directory and execute command to determine which commands is available.
  • Do not required additional logic register/deregister or ENV command.

@sungwoncho
Copy link
Author

It's extensible and also allow to add mantra config or something else

I agree but I am not sure if we need to store any config at this stage. Let's wait and see if there is any need.

@mbabauer
Copy link

I can definitely see a need to allow people to configure the output. For instance, I prefer 2-space tabs, and have my editor set to that. Actually, it was already set to that as the default, as was ESLint. So, every time I create a new artifact I have to manually fix all the tabs. thankfully I have found some plugins to make it easier, but it's still a manual step I must perform each and every time, else ESLint is complaining profusely.

Past that simple annoyance of 2-space vs. 4-space vs. Tabs, I could see the desire to set "defaults" for a project. For instance, I prefer my components to use the -c option all the time. Or, maybe we finally get Astronomy support in, and I prefer my ORM to use Astronomy instead of Collections2/SimpleSchema. Allowing people to customize their experience greatly improves the workflow when using Mantra CLI.

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

4 participants