Download the PHP package ipub/assets-loader without Composer

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

Assets loader

This package is abandoned and no longer maintained!

Extension for loading static CSS and JS files for Nette Framework

Installation

The best way to install ipub/assets-loader is using Composer:

or

After that you have to register extension in config.neon.

Package contains trait, which you will have to use in presenter to implement Assets Loader factory into Presenter. This works only for PHP 5.4+, for older version you can simply copy trait content and paste it into class where you want to use it.

Configuration

This extension has also ability to define different assets groups. So you can define assets for your frontend and for your backend separately like this:

And also this extension bring another feature Packages. So now you can define packages and this packages can be inserted into assets groups:

Now we have defined several packages and this packages can be used in all or some assets groups:

Usage in PHP files

Now you have to create components in your presenter. This components will server static files HTML elements. So in presenter just create two components:

Only one think what you have to set to createXXLoader() method is your asset name. If you don't use assets in groups, extension will use default asset. If you are using separated asset you can enter eg. frontend.

So this is all in PHP part. Extension is now fully integrated.

Using in Latte

In your layout latte template you can put components calls:

Available filters

File filters

coffeScriptFilter

Filter usable only for JavaScript files. This filter will compile your CoffeScripts into executable JS.

lessFilter

Filter usable only for CSS files. This filter will compile your Less files into clean CSS files.

cssUrlsFilter

Filter usable only for CSS files. This filter will convert all images into base64 encoded string, or if it is not a valid image for encoding, it will be converted to url created with routes.files route definition.

Content filters

scriptCompressor

Filter usable only for JavaScript files. This filter minify a Javascript string

styleCompressor

Filter usable only for CSS files. This filter minify a CSS string

cssImportFilter

Filter usable only for CSS files. This filter move import to the top of the document

Using IStaticFilesProvider

This extension also implement an interface for your extensions to automatically load static files. To use this functionality you have to implement IStaticFilesProvider interface into your extension and also one method getStaticFiles:

This static files provider copy the behaviour like in normal settings, so you can define here assets group or only define default asset.


All versions of assets-loader with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
nette/application Version ~2.4
nette/caching Version ~2.4
nette/di Version ~2.4
nette/http Version ~2.4
nette/utils Version ~2.4
latte/latte Version ~2.4
leafo/lessphp Version ^0.5.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 ipub/assets-loader contains the following files

Loading the files please wait ....