Open sungwoncho opened 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.
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
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.
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.
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 appsMANTRA_ROOT
before using CLI. Maybe add a command to do so..meteor
directory and execute commandSuggestions welcomed.