Download the PHP package lightgear/asset without Composer

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

Discountinued

This project has been discountinued since there are better way to handle assets nowadays.
I switched to Gulp.js and will not get back.
This repository will be kept in case somebody uses it in production.

Simple and effective assets management for Laravel 4

Overview

The Lightgear/Asset package is meant to simplify the creation and maintenance of the essential assets of a Laravel 4 based application.

Features

Installation

Via Laravel 4 Package Installer

Manual

Just require

in your composer.json and run

Then register the service provider

and, optionally, the alias

in app/config/app.php

Publish configuration with

This will ceate the app/config/packages/lightgear/asset/config.php file.

Finally create the directory specified as "public_dir" in the config file and give it full writing permissions.

Usage

All you need to do is register your assets with either registerStyles() or registerScripts() methods. Important: assets need to be registered in a file which is always loaded (ex. in a package's ServiceProvider). For example, to register a package assets you would use something like this in your service provider:

or you could register assets located in app/assets with

As you notice in the examples both files and directories can be registered. It's worth noticing that directories are added recursively.

Configuration

A number of config options allow you to customize the handling of the assets. Please check src/config/config.php for details.

Templating

The assets can be printed out in a (blade) template by using

and the same syntax is used for the scripts

Artisan commands

The package comes with 2 commands:

which deletes all published and cached assets and

which generates and publishes the registered assets

Permissions

If you experience permissions issues when running the above commands, it's because the user running artisan is different from the one that generates the assets through the webserver (www-data for example). The issue is explained in greater details at http://symfony.com/doc/current/book/installation.html#configuration-and-setup To fix the issue it's enough to follow the steps outlined in this page. For example on Ubuntu I run the following commands from the project root

When using caching, you would need to do the same

Changelog

1.1: Laravel 4.1 compatibility
1.0: add support for asset groups and improve cache handling
0.8: initial release


All versions of asset with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
illuminate/support Version 4.*
leafo/lessphp Version 0.4.*
mrclay/minify Version 2.1.*
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 lightgear/asset contains the following files

Loading the files please wait ....