Download the PHP package bpedroza/asset-compiler without Composer

On this page you can find all versions of the php package bpedroza/asset-compiler. 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 asset-compiler

Asset Compiler

This package will allow you to compile multiple assets into a single file and minify single or compiled assets. Currently supported types are css and javascript.

An additional benefit to this package is that is adds a cache buster.

Files are compiled, minified, and cache busted using the last modified time of the newest file. New files are not compiled every page load, only when a file changes in the compilation.

Installation

Add "bpedroza/asset-compiler": "1.1.*" to your composer.json require array

Configuration

Start by creating a new instance of the AssetCcompiler and give it paths it needs to build your files. The constructor takes arguments for the absolute path to the assets and an http path. The http path can be relative or include the full web address.

OR

Next you can configure the paths to specific assets, debug, and exception behavior.

By default the css folder is assumed to be /css and the javascript folder is assumed to be /js

All configuration options are getters and setters and can be chained when setting. When the parameter is missing, it will return the current configuration value.

Available configuration options

Method Description Default
rootPath The absolute path (set in constructor) null
httpPath The http path (set in constructor) null
cssPath Path relative to root path where your css files live 'css'
jsPath Path relative to root path where your javascript files live 'js'
compiledFolder Name of folder that will be created in both js and css folders for compiled files 'compiled'
debug When in debug, we won't compile or minify items to make it easier to debug. false
ignoreMissing When true, we won't throw exceptions for missing files. false
minify When true, we will minify file contents. true

Usage

Generate single, cache busted, files.

Output

Minified Output


All versions of asset-compiler with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
matthiasmullie/minify Version 1.3.*
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 bpedroza/asset-compiler contains the following files

Loading the files please wait ....