bitexpert / web-asset-installer
Web Asset Installer Plugin
Installs: 5 961
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 11
Forks: 2
Open Issues: 0
Type:composer-plugin
Requires
- composer-plugin-api: ^1.0
Requires (Dev)
- composer/composer: 1.*@dev
- mikey179/vfsstream: v1.2.0
- phpunit/phpunit: 3.7.*@stable
This package is not auto-updated.
Last update: 2022-02-01 12:24:31 UTC
README
What is the Webasset Installer?
The WebAsset Installer is a custom installer for Composer. To read more about custom Installers in Composer feel free to read the documentation: http://getcomposer.org/doc/articles/custom-installers.md
Wrap-up: The WebAsset installer will install Composer packages with the type of "webasset" in an webroot folder not in the vendor directory.
How to use it?
The composer.json of your webassets package needs to look like this: The package needs to be of type "webasset" and needs to define a target-dir in the extra`s configuration. The target-dir defines the relative path beneath the webroot folder where the webassets get installed.
{
"name": "vendor/mywebpackage",
"type": "webasset",
"require": {
"bitexpert/web-asset-installer": "*"
},
"extra": {
"target-dir": "mywebpackage/"
}
}
The composer.json of your root project looks like this:
{
"name": "my/mywebproject",
"require": {
"vendor/mywebpackage": "*"
}
}
To change the base folder in which the webassets get installed simply add the "webasset-basedir" extra param to your root package composer.json file:
{
"name": "my/mywebproject",
"require": {
"vendor/mywebpackage": "*"
},
"extra": {
"webasset-basedir": "htdocs/"
}
}