-
Notifications
You must be signed in to change notification settings - Fork 82
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
Feature: Master config for Create and Init #91
Comments
@cmather @scott-mcpherson would love your comments on https://github.com/lirbank/iron-cli/commit/413a36a4edcd239824bdee6f84ed92480cf8e9b9 I would like to remove these lines too but wanted to hear what you think first, and add iron-router to the default master config instead. I actually think we should remove the '--skip-iron-router' param all together, I mean isn't iron router required? If it's desirable to keep it we should probably make the '--skip-' param universal so it can be used to skip any package in the master config. |
Cool @lirbank. I'll check this out in he morning, but I definitely like the idea. |
cool. i would make the master config a template in the lib/templates/config/ folder. |
also, can we override opts on the master config at init time? |
@cmather I was hesitant to make the master config a template, since it will only be created the first time (ever) the user is running iron on his/her computer, but I can change that. No problem. Actually, the regular template config folder will NEVER be used if we have a master config, as the master config will always be used to create new projects. So the difference from now is, instead of copying the config from iron's templates to the project it is copied from ~/.iron/config.json to the project. The idea is the same, but when the config is placed in the users home folder it can by customized. Oh yeah, and I've added the install/remove package option to the config... I can do it like this:
I.e. I could just copy the existing config template, as it will not be used the way it is today. And the <=%%> stuff won't be needed as the initial master config will be hard coded, right? What do you think? |
Making it a template is more for our own maintenance of it. Easier for us to see a template file for something than to have it written in code. Then you can copy the template file to whatever location you wish, filling in data values from a data context. See lib/templates/.iron/config.json for example. Can we install the master config at ~/.iron/config.json when the iron-meteor package is installed? I think there's a way to run a post install script where we could do this. I think that would be cleaner than the second approach. It might even make sense to create a new iron command where someone can write/override the global config at a later time (post installation of iron-meteor). So they would do, |
Sure, no problem, I'll use the templates instead Just making a detour via the user's home folder like this:
On adding new commands. I thought about it but the reason for config files is to not have to remember command line flags. Creating new meteor projects happens with moderate frequency so nice to have you favorite setup in a personal config file. But I see, you mean editing the config via command line flags. I can do it but isn't it easier to just type Either way, adding the master config without adding a new command is a good start to see how this is working out. I'll start there I think. Ok? |
Yeah, modifying the master config with a command line seems silly. Maybe just a command to create the initial default file. And then we can invoke that command on initial installation of the command line tool. I wouldn't add additional state to track the first time a project is created. More difficult to understand and maintain. Instead, I would make it clear that when the npm package is installed we add the .iron/config.json file. Or, at any point in the future you can generate the default config using |
btw copying the default master config to the local project on project create makes sense (assuming it exists, otherwise we'd use the template version from lib/templates/config/config.json). |
Hmm, why do we want a On
That's it! Am I missing something? |
One issue though, how should we handle --coffee flags, etc. on We could keep the master config a template (with <%> variables), but then you have to type flags to populate it when creating a new projects, or it will fall back to what is default in the source code of iron. See what I mean? The defaults should be hard coded into the master config, so you don't have to type command line flags and don't have to rely on the defaults in the source code. |
It's just a matter of organization/maintainability and usability. Logic above makes sense, but we should also have the master config installed at the time iron-meteor is installed so that a user can update it before creating a project. Also, at some point, they may want to revert the file back to defaults, or create the file if it's somehow deleted. So having an On |
We can still allow flags to override the master config on |
Aha! Now I understand why we need a |
+1 for this feature |
Moving the conversation in issue #82 about custom boilerplate code and default packages for new projects to here.
The idea is to have a customizable global config (and possibly custom boilerplate code) that is used when creating new projects.
Goals
Init/create process:
Ref #32
The text was updated successfully, but these errors were encountered: