delboy1978uk / composer-assets-plugin
Composer plugin for installing of assets backported for PHP 5.3.
Installs: 1 352
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 5
Type:composer-plugin
Requires
- php: >=5.3.0
- composer-plugin-api: ^1.0
This package is auto-updated.
Last update: 2024-11-19 10:46:57 UTC
README
Composer plugin for installing assets, backported for PHP 5.3.
Installation
Use Composer:
composer require delboy1978uk/composer-assets-plugin
Library requires PHP 5.3 or later.
Commands
composer refresh-assets
- refresh files inassets
directory
Assets configuration
Packages
assets-files
in sectionextra
true
- symlinks whole package directory- file path - symlinks one file or directory
- list of file paths - symlinks files/directories
Example:
{ "extra": { "assets-files": [ "static/plugin.js", "static/plugin.css", "static/icons.png" ] } }
static/plugin.js
- symlinks file toassets/org/package/plugin.js
static/plugin.css
- symlinks file toassets/org/package/plugin.css
static/icons.png
- symlinks file toassets/org/package/icons.png
Root package
assets-dir
- directory for installing of assets, defaultassets
, relative tovendor-dir
assets-directory
- alias forassets-dir
assets-files
- list of asset files in incompatible packages, it overridesassets-files
from installed packagesassets-strategy
- install strategy for assetsauto
- select strategy by platform (default value)copy
- copy all assets, default strategy on Windowssymlink
- create relative symlinks, default strategy on non-Windows platforms
assets-target
- target directory for specific packages, relative tovendor-dir
, must be out ofassets-dir
Example:
{ "config": { "assets-dir": "public", "assets-files": { "org/package": true, "org/package2": "js/calendar.js", "org/package3": [ "static/plugin.js", "static/plugin.css", "static/icons.png" ] }, "assets-target": { "ckeditor/ckeditor": "admin/wysiwyg" } } }
org/package
- symlinks whole package directory topublic/org/package
org/package2
- symlinks filejs/calendar.js
topublic/org/package2/calendar.js
org/package3
static/plugin.js
- symlinks file topublic/org/package3/plugin.js
static/plugin.css
- symlinks file topublic/org/package3/plugin.css
static/icons.png
- symlinks file topublic/org/package3/icons.png
ckeditor/ckeditor
- symlinks files toadmin/wysiwyg
Default mapping
Plugin provides default mapping for selected incompatible packages. You can override this mapping in your composer.json
.
List of packages with default mapping:
ckeditor/ckeditor
components/jquery
nette/forms
o5/grido
Where find supported packages?
Some libraries and packages support Composer by default. For other exists shim-repositories:
Always you can search packages on Packagist.
License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/