mantrajs / mantra-cli

Command line interface for building Meteor apps with Mantra
MIT License
135 stars 33 forks source link

Can only run CLI when on app root #3

Open sungwoncho opened 8 years ago

sungwoncho commented 8 years ago

CLI assumes that you are on the app root directory.

possible solutions

Suggestions welcomed.

JackAdams commented 8 years ago

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 commented 8 years ago

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

Pros.

sungwoncho commented 8 years ago

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 commented 8 years ago

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.