Download the PHP package wearejh/statics-merger without Composer

On this page you can find all versions of the php package wearejh/statics-merger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package statics-merger

Statics Merger

Build Status Scrutinizer Code Quality Scrutinizer Code Coverage

A composer plugin aimed to simplify the workflow between the frontend and backend development teams. Static repositories that the frontend team use are added as a composer dependency to the project as type .

The plugin hooks onto two composer commands and in which on completion will symlink all static packages as defined in their file.

Installation

This module is installable via . If you have used the Magento Skeleton as a base module then you can just require this project and all the rest is done for you.

Magento 1

Magento 2

Upgrading 1.x to 2.x ?

It's recommended to first run composer update statics-merger --no-plugins after changing your composer.json and then run a composer update nothing to map the new configuration.

Note: Depending on the configuration changes you may also have to manually cleanup any remaining symlinks from the old mappings

Usage

Statics project

If the composer.json file is not already there, create one with relevant information and commit it to the repo.

For this to work the statics repository requires the composer.json to have the type set to static.

Example Static Composer.json

Magento project

Within your projects composer.json you will need to ensure you have a few configurations set up.

In your require you will need to add any statics that you want and if private also add the repo.

Note: It's great at handling multiple static repositories :thumbsup:

In your you need the set correctly and have defined the for each static repository.

The first key is the name of the repository which you have used in the require section, while inside there each key is the package/theme in which the example would map to skin/frontend/package/theme within your `magento-root-dir.

The package/theme array contains several objects defining the src and dest of the files. The src value is relevant to the root of the statics repository while the dest is relevant to the package/theme defined in the Magento project such as skin/frontend/package/theme/ within your magento-root-dir.

Need to map a static repo to more than 1 package or theme? No problem just add another package/theme array to your repos mappings, of course make sure you use a different name to any others to avoid overwriting.

Valid Mappings

Note: Globs require the dest to be a folder and not a file, whereas files and directories need to point to there corresponding full path which allows you to rename them if required. If you leave the dest blank on a glob it will map to the same source directory structure within your package/theme

Files

Link an image into a different directory structure and rename

Directories

Linking a whole directory keeping all sub-dirs & files

Globs

You can also use globs which makes it pretty awesome! A great use case for this is favicons where you could have multiple at different resolutions with a set naming convention. To target them all you would simply use favicon* like in the default example below.

All favicons to root dir skin/frontend/package/theme/

Final Notes

Problems?

If you find any problems or edge cases which may need to be accounted for within this composer plugin just open up an issue with as much detail as possible so it can be recreated.

Running Tests


All versions of statics-merger with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wearejh/statics-merger contains the following files

Loading the files please wait ...