Build chromium extensions
- PHP version must be at least 5.3
- zlib extension
- openssl extension
Add the following dependencies to your projects composer.json file:
"require": {
# ..
"andyps/crxbuild": "1.0.*@dev"
# ..
}
- Command line
$ php vendor/bin/crxbuild.php --extension_dir=<extension dir> --key_file=<private key path> --output_dir=<output dir>
output_dir is an optional. It is your current directory by default. You may also use crxbuild.sh (Linux) and crxbuild.bat (Windows), so it'll look like
$ ./vendor/bin/crxbuild.sh --extension_dir=<extension dir> --key_file=<private key path>
- PHP
<?php
require 'vendor/autoload.php';
$crxBuild = new CrxBuild(array(
'extension_dir' => $extensionDirectory,
'key_file' => $pathToYourPrivateKey,
'output_dir' => $whereToPlaceZipAndExtensionCrxFiles //optional
));
$crxBuild->build();