fxpio / composer-asset-plugin

NPM/Bower Dependency Manager for Composer
MIT License
893 stars 156 forks source link

Add an option to disable composer-asset-plugin from root composer.json #249

Closed nkovacs closed 7 years ago

nkovacs commented 8 years ago

I'd like to use asset-packagist, but I have to have composer-asset-plugin installed globally for other projects, and having it installed negates almost all of the speed benefits of asset-packagist. I can't use composer's --no-plugins option either.

I'd like to disable composer-asset-plugin from the project's composer.json (since that's where I have to add asset-packagist as a repository) so that I can work on both kinds of projects.

schmunk42 commented 8 years ago

@nkovacs Can you work around that with COMPOSER_HOME https://getcomposer.org/doc/03-cli.md#composer-home?

nkovacs commented 8 years ago

Not really. I'm not in control of the environment of the developers working on the project, I can only change the project's composer.json.

francoispluchino commented 8 years ago

In this case, we cannot disable the plugin if env variable and Composer extra option are not possible.

nkovacs commented 8 years ago

Can't you make it not do anything?

francoispluchino commented 8 years ago

We can disable the plugin with a environment variable or an extra option in the project composer.json file.

nkovacs commented 8 years ago

or an extra option in the project composer.json file.

That's exactly what I'd like (I misunderstood your comment).

francoispluchino commented 8 years ago

ok, with your previous comment, I thought that possibility was not possible.

francoispluchino commented 7 years ago

My approach for this new feature:

  1. Use the global config option config.fxp-asset.enabled with the default value true
  2. Override the config option with the custom option defines in the project composer file file (always with config.fxp-asset.enabled
  3. Enable or disable the plugin
schmunk42 commented 7 years ago

@francoispluchino What's about https://github.com/fxpio/composer-asset-plugin/issues/251 - I think it would be great if we could just disable the requests, if cache has been filled in the past x days - regarding performance.

francoispluchino commented 7 years ago

Added by fda53b9edbe53621d55e05f29a8e9b1095e32079.