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

[console] Set defaults for commands on user config file. #515

Closed
jmolivas opened this issue Mar 18, 2015 · 5 comments
Closed

[console] Set defaults for commands on user config file. #515

jmolivas opened this issue Mar 18, 2015 · 5 comments

Comments

@jmolivas
Copy link
Member

I am planning to set defaults for commands on that config file at home directory ~/.console/config.yml, will probably look something like this:

command:
  generate:
    module:
      options: 
        module: My example module
        machine-name: example
    controller:
      options: 
        module: example
        class-name: ExampleController

The idea is to take advantage of user config file at ~/.console/config.yml file on user home directory.

Feature based on this issue at d.o. https://www.drupal.org/node/2392831

@omero
Copy link
Contributor

omero commented Mar 18, 2015

It's very interesting this enhancement ... comes to me, the idea to have different default files and calling when it needed like alias to create for example modules with a default package 😃

@jmolivas
Copy link
Member Author

you mean like pre-sets of data, I have not think on that possibility but could make sense

@jmolivas
Copy link
Member Author

That what you mentioned @omero maybe fits better with the issue #516

Using the second option
Reading from a YAML manifest file.
$ drupal chain:commands --manifest=PATH_TO_MANIFEST_FILE.yml

@enzolutions
Copy link
Contributor

The default values could be generated using the command --generate-chain that will be included in next release 0.7.15

@jmolivas
Copy link
Member Author

jmolivas commented Jul 3, 2015

Great idea @enzolutions but the format for setting the defaults and the chain are not the same but we can apply a similar approach and add a global option --default and output the generated code to be added on the config.yml file

jmolivas added a commit to jmolivas/drupal-console that referenced this issue Jul 3, 2015
jmolivas added a commit to jmolivas/drupal-console that referenced this issue Jul 3, 2015
@jmolivas jmolivas modified the milestones: 0.7.15-release, must-have Jul 3, 2015
@jmolivas jmolivas closed this as completed Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants