Download the PHP package awjudd/assetprocessor without Composer

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

Laravel 5 - Asset Processor

Build Status ProjectStatus

A quick and easy way to manage and process assets in Laravel 5

Features

Quick Start

In the require key of composer.json file add the following

Run the Composer update command

In your config/app.php add 'Awjudd\AssetProcessor\AssetProcessorServiceProvider' to the end of the $providers array

Also update aliases part of the config/app.php to include 'Awjudd\AssetProcessor\Facades\AssetProcessorFacade'.

Setup

Publishing the Configuration

The next step to installing this plugin is to publish the configuration file by doing the following:

Configuration Values

Once the configuration is published, you may need to update some parts of it to better suit how your application is set up.

Within the 'cache' section of the assetprocessor.php file, you may want to adjust the 'singular' value. By default it is set to true. This will make it so that when you are in the live environment, all assets that have been added to the package (depending on the type) will be returned in a single file. This will help in reducing the number of page requests done in an effort to help pages to render faster. However, if you want to disable this you can by flipping the field to false.

The only other configuration values that one generally needs to be aware of are the ones in the 'enabled' section.

Any environments that are set up in the 'environments' section will automatically have all assets processed on them. Any other environments will only process the files that need pre-processing (i.e. LESS, SASS and CoffeeScript) in order to be executed. However, if you want to, you are able to force the processing of all of the files by flipping the 'force' value to true.

Adding CDN Assets

Need to use a file that is stored on a Content Delivery Network (CDN)? No problem! Just use:

It will automatically be emitted at the very beginning of the corresponding asset section.

Adding Local Assets

Adding assets to use is fairly straightforward. All you need to do is call the following:

Asset Auto-Loading

If you know that you need to assets that are automatically loaded on every page (i.e. assets that are core to your layout), then you can use the new section in the configuration file to load them.

Emitting Assets

This will then automatically add in and determine the type of the file that was just loaded. Once all of your assets are loaded into the plugin, in order to emit them to the browser (with the appropriate tags) you will need to call the following (in your view):

Asset Groups

If you want to group a bunch of assets together, you are able to provide a third parameter to the add method. The third parameter is an "attributes" array. In order to use an asset group, you can provide the "group". For example:

This will make the asset file provided only available in that asset group. To retrieve the asset, you will need to do the following (assuming the file was a CSS file)s:

File Caching

All of the files that are generated are stored in the app/storage/assets folder by default

Once an asset file is generated (for the last time), the file name it is given is a hash of the actual contents of the file. This means that if the contents change, so does the file name. Because of this, it will automatically force the browser to read the new asset instead of the old file (eliminating the need to have users to refresh cache).

Each step of the processing is also cached in order to help to reduce the overhead of regenerating the files. This means that the file is only read IF the actual asset file has changed.

External-Access File Caching

There were a few minor performance issues if you were to retrieve assets through the controller (caused by the fact that Laravel had to boot up), so now Asset Processor will be able to push files out into the web root (assuming you give the folder the proper permissions). This will mean your pages will load a lot faster!

By default it writes to: public_path('assets/generated') however, you are able to modify this in the 'cache' section of your configuration file.

File Pre-Processing

In order to support the manual pre-processing of the asset files required, you are now able to use the following command:

This accepts an array of files to process. To run, use the following command:

This will complete any processing that is required and then for all of the selected files, combine them into a singule file (by asset type).

File Cleanup

As assets change, and so do the generated asset files. Because of this there is a built-in cleanup command that will remove any assets which were not touched within the last day (duration can be changed in either the configuration variable, or the --duration flag that is provided).

In order to run the cleanup, all you need to do is run the following command:

Or if you want to change the duration:

The previous command will make it so that it will remove any assets that were not touched within the last minute.

Current Processors And Their Associated File Extensions

License

Asset Processor is free software distributed under the terms of the MIT license

Additional Information

Any issues, please report here

Release Notes:

1.0.0:

1.0.1:

1.0.2:

1.0.3:

1.0.4:

1.0.5:

1.0.6:

1.1.0

1.2.0

1.3.0


All versions of assetprocessor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version ~5
leafo/lessphp Version 0.5.0
leafo/scssphp Version 0.3.0
werkint/jsmin Version 1.0.0
natxet/cssmin Version 3.0.x
coffeescript/coffeescript Version 1.3.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 awjudd/assetprocessor contains the following files

Loading the files please wait ....