flyntwp / flynt

Component based WordPress starter theme, powered by ACF Pro and Timber, optimized for a11y and fast page load results.
https://flyntwp.com
MIT License
734 stars 84 forks source link

Installer path in the composer.json #405

Closed thomasnavarro closed 3 years ago

thomasnavarro commented 3 years ago

Hi !

I see that the installation paths for plugins, mu-plugins and theme go in the vendor folder of the theme. On my side, if I want to use compose to install my theme specific plugins, I have to change the paths :

Your composer.json

"installer-paths": {
  "vendor/{$vendor}/{$name}/": [
    "type:wordpress-muplugin",
    "type:wordpress-plugin",
    "type:wordpress-theme"
  ]
},

My composer.json

"installer-paths": {
  "../../plugins/{$name}": ["type:wordpress-plugin"],
  "../../mu-plugins/{$name}": ["type:wordpress-muplugin"]
}

So I was wondering if there was a particular reason why you defined the paths in the vendor?

domtra commented 3 years ago

Hi @thomasnavarro, honestly, we do not use the themes composer.json to install plugins. We usually have another composer.json in the projects root file, where we specify the correct installer paths. The idea behind the current config was that if you decide to install a plugin inside of the theme, you probably want it to be installed inside of the theme, as well. Currently we will not change this, but might get rid of it completely in the future to avoid confusion.