Download the PHP package reputation-vip/composer-assets-installer without Composer

On this page you can find all versions of the php package reputation-vip/composer-assets-installer. 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 composer-assets-installer

Composer Assets Installer Build Status

Composer Assets Installer provides a fast and easy way to copy the assets of your Composer packages into your public folder. You only have to chose one or multiple asset directories of the target in your "composer.json" file.

Code Example

Here is the composer.json file of a distant Composer package we want to use in our project :

{
    "require": {
        "reputation-vip/composer-assets-installer": "~1.0"
    },
    "name": "reputation-vip/required-distant-package",
    "extra": {
        "assets-dir" : "public"
    }
}

Here is the composer.json file of our project :

{
    "require": {
        "reputation-vip/composer-assets-installer": "~1.0",
        "my/required-distant-package": "~1.0"
    },
    "extra": {
        "assets-dir" : "web"
    }
}

Then, the assets will be accessible through the following path: web/my/required-distant-package.

Motivation

As members of the Reputation VIP's development team, we are used to creating full Composer packages, embedding a javascript logic and a css layer.

When we first started using Composer, we were somehow frustrated by it's lack of asset handling. Indeed, Composer forced us to manually copy the assets into our public directory. Furthermore, every time we updated the package, we had to repeat this task.

That's why we needed a tested, documented and easily configurable Composer plugin which allowed us to keep control on the asset directories.

Installation

You simply have to add the following line to the requirements of your composer.json file:

"require": {
    "reputation-vip/composer-assets-installer": "~1.0"
}

Then, you can specify the target for your asset directory (web for example):

"extra": {
    "assets-dir": "web"
}

API Reference

With this solution, you can specify as many targets as you want:

"extra": {
    "assets-dir": {
        "js": "web/js",
        "css": "web/css"
     }
}

All versions of composer-assets-installer with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ~1.0
symfony/filesystem Version ^3.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 reputation-vip/composer-assets-installer contains the following files

Loading the files please wait ....