trellis-cli icon indicating copy to clipboard operation
trellis-cli copied to clipboard

Feature Request: Presets for New Projects

Open knowler opened this issue 2 years ago • 3 comments

Terms

Summary

This would be a flag for new that could point to a file that might specify a list of plugins/packages to install for the project.

Motivation

Why are we doing this?

Developer convenience.

What use cases does it support?

Say you are an agency with a stack of plugins/packages that you always use for new projects or perhaps you have multiple types of projects each with their own list of plugins.

What is the expected outcome?

New Trellis project is created with Bedrock + all the plugins from the config file.

Potential conflicts / foreseeable issues

We will need to think through how the configuration would work. Should it just be a file that lives anywhere, should it be in a global conventionally placed config file, could it be a remote file somewhere (like a repo public or private)? We’d need to figure this out and stick with it.

Additional Context

No response

knowler avatar Mar 29 '22 20:03 knowler

What kind of plugins/packages?

  • Composer
  • Ansible galaxy roles?

In either case, could this be solved by https://github.com/roots/trellis-cli/issues/9 ? In your use case, the agency would have a custom Bedrock or Trellis fork (with the packages they want).

swalkinshaw avatar Mar 29 '22 20:03 swalkinshaw

What kind of plugins/packages?

Composer

In either case, could this be solved by https://github.com/roots/trellis-cli/issues/9 ? In your use case, the agency would have a custom Bedrock or Trellis fork (with the packages they want).

Oops, ya, I missed that. Though, I’ve heard difficulty expressed on a few occasions about the need to maintain a fork. I thought something like this could alleviate that.

knowler avatar Mar 29 '22 20:03 knowler

I would also be interested in this. At my agency, we have a private composer repository source that has all of the private plugins our agency uses. Right now, we always go add that to the config each time we run a new project. It would be great if we could specify a config file that would be used.

config.json

... other yaml keys ...

  "repositories": [
    {
      "type": "composer",
      "url": "https://wpackagist.org",
      "only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
    },
    {
      "type": "composer",
      "url": "https://composer.example.com"
    }
  ],
  "require": {

   ... other require slugs ...

    "elementor/elementor-pro": "*"
  },

johnkraczek avatar Jul 12 '23 20:07 johnkraczek