balbuf / drupal-libraries-installer

Install Drupal libraries via a simple listing in your composer.json file
13 stars 6 forks source link

Add info to composer.lock so libraries are only installed when new/changed #2

Open balbuf opened 6 years ago

balbuf commented 6 years ago

The files themselves are cached, so they are not downloaded every time, but they are still reinstalled from the cache anytime composer install or composer update is run.

generalredneck commented 4 years ago

If you are looking for this functionality, there is the old school work around of defining the zip file as a package... something like

{
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "drupal-library/jquery-ui-touch",
                "version": "0.2.3",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/furf/jquery-ui-touch-punch/archive/4bc009145202d9c7483ba85f3a236a8f3470354d.zip",
                    "type": "zip"
                },
                "require": {
                    "composer/installers": "^1.2.0"
                }
            }
        }
    ],
    "require": {
        "drupal-library/jquery-ui-touch": "0.2.3",
    }
}

I know this is a lot longer form, but does help with the above issue. Not trying to discount the original request... it's still important and useful.

generalredneck commented 4 years ago

Also looking at the above, this feature has been implemented in https://github.com/zodiacmedia/drupal-libraries-installer