koala-framework / composer-extra-assets

Composer Plugin for installing Assets using native npm/bower
BSD 2-Clause "Simplified" License
42 stars 11 forks source link

Removing all packages with bower dependencies does not update bower.json #14

Closed claudio-silva closed 9 years ago

claudio-silva commented 9 years ago

First, I'd like to thank you for such an awesome plugin! It's just what we needed for managing bower dependencies of modules/plugins of the open source PHP framework we're developing at our company.

Unfortunately, I'm faced with a show-stopper bug that, if not fixed, will render this plugin unusable for us. When I uninstall from a project all composer packages that contain bower dependencies, composer-extra-assets doesn't update bower.json, leaving the file on its previous state, and leaving all installed javascript libraries on the bower_components folder.

If I leave, at least, one bower dependency somewhere when uninstalling a package, the plugin performs correctly, updating bower.json and removing all unneeded libraries.

It seems the plugin code is checking if the list of bower dependencies is empty, and it only updates bower if it is not.

nsams commented 9 years ago

Nice to hear you find the plugin useful.

Sorry for the delay, but your problem should be fixed now. If it works for you I can release 2.0.1.

claudio-silva commented 9 years ago

Thanks! Though, as you took a long time to respond, I thought this project was dead and I decided to fork it. I hope you don't mind. I fixed this issue and then decided to simplify the plugin, by removing npm modules installation and bower.lock, which we don't need, and I also did some changes to the config. format. You can find it at php-kit/composer-bower-plugin. As it is, it fits our needs perfectly. We are combining it with composer-merge-plugin to create a modular plugin system for our framework. In the end, doing this has been a good learning experience, as I was new to the development of Composer plugins, and your project provided a good starting point, instead of starting from scratch. Regards, Claudio