I have done this with beanstalkd and it made I ended up removing so much code and fixed up my dependency management so much.

Also it would negate the using of the change as suggested in #2328853 which automatically downloads the dependencies.

For the project I am using this for I just add the following to the composer.json file

I would suggest something like this:-

{
    "name": "drupal/navbar",
    "description": "Mobile Friendly Navigation Toolbar",
    "type": "drupal-module",
    "require": {
        "components/backbone": "1.0.0",
        "components/modernizr": "2.7.2",
        "components/underscore": "1.5.2",
        "robloach/component-installer": "*",
   },
   "config": {
        "component-dir": "docroot/sites/all/libraries",
        "component-baseurl": "/sites/all/libraries"
    }
}

So basically with this you can add the following line to you root composer.json file

{
    "require": {
        "drupal/navbar": "1.7",
    },
   "config": {
        "component-dir": "docroot/sites/all/libraries",
        "component-baseurl": "/sites/all/libraries"
    }
}

I added in the config again, as I am not sure if it will be used from the import composer.json file.

All you do is run the following command:=

$ composer update

this will then download navbar and all the dependencies. Also if you change your dependencies then when people update the navbar module it will automatically update the dependent libraries without needing any stuffing around by the user.

Comments

gordon created an issue.