Download the PHP package dotsunited/bundlefu without Composer

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

BundleFu

Build Status

BundleFu is a PHP 5.3+ library which bundles multiple css/javascript files into a big package and sends it out at once.

It is highly inspired by the Ruby on Rails plugin bundle-fu.

In short, it turns this:

Into this:

Features

Installation

BundleFu can be installed using the Composer tool. You can either add dotsunited/bundlefu to the dependencies in your composer.json, or if you want to install BundleFu as standalone, go to the main directory and run:

You can then use the composer-generated autoloader to access the BundleFu classes:

Usage

Configure a Bundle instance:

Alternatively, you can pass an options array to the constructor (or use the method setOptions later):

Use the instance to bundle your files in your templates:

Output the bundle <script> and <link> tags wherever you want:

Using the Factory

You can also use a factory to create bundle instances. The advantage is, that the factory can hold global options (like bypass and doc_root) which are shared across all created bundles:

You can pass specific options to the createBundle method (global factory options will be overwritten):

The factory also lets you define name aliases for filters. You can then define the string alias for the css_filter and js_filter options instead of passing a filter instance:

Filters

You can manipulate the loaded css/javascript files and the bundled css/javascript code with filters. Filters are classes which implement DotsUnited\BundleFu\Filter\FilterInterface.

You can add filters like this:

If you need multiple filters, you can use DotsUnited\BundleFu\Filter\FilterChain like this:

Default filters

BundleFu provides the following filters out of the box.

CssUrlRewriteFilter

The DotsUnited\BundleFu\Filter\CssUrlRewriteFilter rewrites relative URLs in your CSS file to avoid broken image references:

ClosureCompilerServiceFilter

This filter compiles javascript code with the Google Closure Compiler using the Service API.

Simply add the DotsUnited\BundleFu\Filter\ClosureCompilerServiceFilter filter and your javascript bundles will be automatically compiled:

CallbackFilter

The DotsUnited\BundleFu\Filter\CallbackFilter can filter by using any PHP callback. If you want to compress your CSS using YUI Compressor you can either write a custom filter or use the following code leveraging the Callback filter:

Notes

License

BundleFu is released under the MIT License.


All versions of bundlefu with dependencies

PHP Build Version
Package Version
Requires php Version >=5.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 dotsunited/bundlefu contains the following files

Loading the files please wait ....