Download the PHP package bradstinson/assets without Composer
On this page you can find all versions of the php package bradstinson/assets. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bradstinson/assets
More information about bradstinson/assets
Files in bradstinson/assets
Package assets
Short Description A simple assets library. Combine and minify your JS and CSS assets
License MIT
Homepage https://github.com/bradstinson/assets
Informations about the package assets
Assets
Assets is yet another CSS/JavaScript minificaton and combination library. However, unlike most other libraries (which rely on Assetic), this ones takes a more simplistic approach.
Assets supports minifying and combining stylesheets and scripts, in an effort to reduce the number and size of http requests needed to load a given page. The generated file is also cached, which prevents an application from having to generate the same file for every new request.
Basic usage
CSS
CSS files can be added using the following command, where "file1.css" and "file2.css" are the CSS files you want to include, and are located at assets/css/file1.css and assets/css/file2.css.
You may also submit files as an array.
Assets will minify both CSS files and combine them into a single file (which is written to 'assets/cache' directory). The proper tags will then be returned. To include this file in your page, use the following:
LESS
Less files can be added using the following command, where "file1.less" is the Less file you want to compile, and is located at assets/css/file1.less.
You may also submit multiple files as an array.
Your Less files will be automatically compiled and combined with your CSS files into a single file (which is written to 'assets/cache' directory). The proper tags will then be returned.
JS
Javascript files can be added using the following command, where "file1.js" and "file2.js" are the javascript files you want to include, and are located at assets/js/file1.js and assets/js/file2.js.
You may also submit files as an array.
Assets will minify both JS files and combine them into a single file (which is written to 'assets/cache' directory). The proper tags will then be returned. To include this file in your page, use the following:
CoffeeScript
CoffeeScript files can be added using the following command, where "file1.coffee" is the CoffeeScript file you want to compile, and is located at assets/js/file1.coffee.
You may also submit multiple files as an array.
Your CoffeeScript files will be automatically compiled and combined with your JS files into a single file (which is written to 'assets/cache' directory). The proper tags will then be returned.
If you would like to generate the CSS and JS tags together, you can call:
Configuration
By default, this library assumes the following directory structure:
However, you are now able to adjust the path to the assets directory (if needed):
BaseURL
Groups
This library currently does not offer support for groups. This is because the project I was working on did not require it. If enough requests are made, this may be added in a future version.
Thanks
This asset library was inspired by and uses components from the following libraries:
Contributing
If you have any issues/complaints/suggestions, let me know and I will see if I can implement them as time permits. Also, pull requests are also welcome.
All versions of assets with dependencies
kriswallsmith/assetic Version 1.*
natxet/cssmin Version 3.0.*@dev
leafo/lessphp Version v0.3.9
coffeescript/coffeescript Version 1.3.1