Random thoughts

composer support for processwire part 2

In my earlier post I mentioned about adding a composer.json in the root of the github repo.

Sometimes you may see a non composer.json repo or some times people reject it, you still can do like the below.

<?php
{
    "minimum-stability": "dev",
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "ryancramerdesign/process-export-profile",
                "version": "1.0.0",
                "source": {
                    "url": "https://github.com/ryancramerdesign/ProcessExportProfile",
                    "type": "git",
                    "reference": "master"
                },
                "type": "pw-module",
                "require": {
                    "hari/pw-module": "~1.0"
                }
            }
        }
    ],    
    "require": {
        "ryancramerdesign/process-export-profile": "1.0.0"
    }
}

And run

php composer.phar update

Don't forget you need composer.phar. If you don't have get from getcomposer.org

The module is downloaded to site/modules/ProcessExportProfile. The package is of type pw-module

The name process-export-profile is converted to ProcessExportProfile . So if you have caps in between name put a hyphen in the naming

Menu