2017 © Pedro Peláez
 

composer-plugin composer-assets-plugin

Composer plugin for installing of assets.

image

frontpack/composer-assets-plugin

Composer plugin for installing of assets.

  • Wednesday, April 4, 2018
  • by janpecha
  • Repository
  • 1 Watchers
  • 5 Stars
  • 400 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 7 Versions
  • 85 % Grown

The README.md

Composer Assets Plugin

Composer plugin for installing assets., (*1)

Donate, (*2)

Installation

Use Composer:, (*3)

composer require frontpack/composer-assets-plugin

Library requires PHP 5.6.0 or later., (*4)

Commands

  • composer refresh-assets - refresh files in assets directory

Assets configuration

Packages

  • assets-files in section extra
    • true - symlinks whole package directory
    • file path - symlinks one file or content of directory
    • list of file paths - symlinks files/directories

Example:, (*5)

``` json { "extra": { "assets-files": [ "static/plugin.js", "static/plugin.css", "static/icons.png" ] } }, (*6)


* `static/plugin.js` - symlinks file to `assets/org/package/plugin.js` * `static/plugin.css` - symlinks file to `assets/org/package/plugin.css` * `static/icons.png` - symlinks file to `assets/org/package/icons.png` Or you can use simple: ``` json { "extra": { "assets-files": "static" } }

with same result., (*7)

Root package

  • assets-dir - directory for installing of assets, default assets, relative to vendor-dir
  • assets-directory - alias for assets-dir
  • assets-files - list of asset files in incompatible packages, it overrides assets-files from installed packages
  • assets-strategy - install strategy for assets
    • auto - select strategy by platform (default value)
    • copy - copy all assets, default strategy on Windows
    • symlink - create relative symlinks, default strategy on non-Windows platforms
  • assets-target - target directory for specific packages, relative to vendor-dir, must be out of assets-dir

Example:, (*8)

json { "extra": { "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" } } }, (*9)

  • org/package - symlinks whole package directory to public/org/package
  • org/package2 - symlinks file js/calendar.js to public/org/package2/calendar.js
  • org/package3
    • static/plugin.js - symlinks file to public/org/package3/plugin.js
    • static/plugin.css - symlinks file to public/org/package3/plugin.css
    • static/icons.png - symlinks file to public/org/package3/icons.png
  • ckeditor/ckeditor - symlinks files to admin/wysiwyg

Default mapping

Plugin provides default mapping for selected incompatible packages. You can override this mapping in your composer.json., (*10)

List of packages with default mapping:, (*11)

  • bower-asset/tiny-slider
  • ckeditor/ckeditor
  • components/jquery
  • enyo/dropzone
  • nette/forms
  • o5/grido

Where find supported packages?

Some libraries and packages support Composer by default. For other exists shim-repositories:, (*12)

  • https://github.com/components
  • https://github.com/frontpack

Always you can search packages on Packagist., (*13)


License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/, (*14)

The Versions

04/04 2018

dev-master

9999999-dev

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

  • composer-plugin-api ^1.0
  • php >=5.4.0

 

04/04 2018

v0.9.4

0.9.4.0

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

07/02 2018

dev-wip-entry-points

dev-wip-entry-points

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

08/11 2017

v0.9.3

0.9.3.0

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

26/02 2017

v0.9.2

0.9.2.0

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

21/02 2017

v0.9.1

0.9.1.0

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0

 

27/12 2016

v0.9.0

0.9.0.0

Composer plugin for installing of assets.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0
  • composer-plugin-api ^1.0