New!
Import instagram posts as nodes automatically with the instagram importer module for drupal 8 & 9.

 

Apr 20, 2020 in

Sometime you would want to require a module or library from Github instead some packagist or drupal.org. Here's how you would do this. In the 'repositories' section of your composer.json file, add your library like this:
 

    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "package",
            "package": {
                "name": "harvesthq/chosen",
                "version": "1.8.7",
                "type":"drupal-library",
                "source": {
                    "url": "https://github.com/harvesthq/chosen.git",
                    "type": "git",
                    "reference": "master"
                }
            }
        }
     ]

When you did this, it is as simple as running the following command:

composer require harvesthq/chosen