inpsyde / composer-asset-compiler

Composer plugin that installs dependencies and compiles assets based on configuration.
https://inpsyde.github.io/composer-asset-compiler/
MIT License
25 stars 1 forks source link

[Feature Request]: Allow custom config file #13

Closed tyrann0us closed 8 months ago

tyrann0us commented 2 years ago

Is your feature request related to a problem?

If you don't want to place the Composer Assets Compiler configuration in the main composer.json file, you can put it in a separate assets-compiler.json file in the root directory of the package (see documentation: https://github.com/inpsyde/composer-asset-compiler#configuration-basics). However, you cannot specify a custom config file location. This differs from other much-used Composer plugins like WordPress Translation Downloader or WP Starter which allow specifying a custom config file.

We usually place these config files in a separate folder, e.g. config/, so assets-compiler.json is the only config that is "left" in the root directory.

Describe the desired solution

Similar to WP Starter (see documentation https://github.com/wecodemore/wpstarter/blob/dev/docs/04-WP-Starter-Configuration.md#configuration-in-a-custom-file), it would be great to be able to specify a custom config file different from the standard stand-alone assets-compiler.json file in the project root.

WP Starter's config file check is not complicated and it should be relatively easy to adapt this to Composer Asset Compiler: https://github.com/wecodemore/wpstarter/blob/ce4032f7524a64008794a6829d2e0212c4cbc42a/src/Util/Requirements.php#L189-L226

Describe the alternatives that you have considered

None, keep using assets-compiler.json.

Additional context

No response

Code of Conduct

gmazzap commented 8 months ago

This is implemented. Not sure why this is still open.