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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
    "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

1
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

composer, modules, processwire

Comments