Download the PHP package simple-php/composer-assets-plugin without Composer
On this page you can find all versions of the php package simple-php/composer-assets-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simple-php/composer-assets-plugin
More information about simple-php/composer-assets-plugin
Files in simple-php/composer-assets-plugin
Package composer-assets-plugin
Short Description Composer plugin for installing of assets.
License BSD-3-Clause
Informations about the package composer-assets-plugin
Composer Assets Plugin
Composer plugin for installing assets.
Installation
Use Composer:
Library requires PHP 5.4.0 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:
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
By default, assets files stored in assets-dir
specified in root package composer config. Package name used as path, for example, for package
package-owner
/package-name
following path will be used by default: assets-dir
/package-owner
/package-name
.
You can specify different default path for package with option assets-target
in section extra
:
assets-target
target path to copy assets files, optional- if relative path specified it will be related to
assets-dir
- if absolute path specified it will be related to parent of
vendor-dir
- if relative path specified it will be related to
Example:
json { "extra": { "assets-target": "/templates/default/js", "assets-files": [ ... some assets files ... ] } }
Absolute path specified, assets files will be copied to project-dir
/templates/default/js, where project-dir
is parent directory of composer vendor-dir
IMPORTANT: Assets files will not be cleaned on package update or removing, if default absolute path for assets-target
is used.
If you need automatic cleanup of assets files for this package you must redefine assets-target
for this package in root package config.
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:
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/
All versions of composer-assets-plugin with dependencies
composer-plugin-api Version ^1.0