Download the PHP package tripomatic/nette-assetic without Composer

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

Tripomatic\NetteAssetic

A lightweight Assetic integration in Nette Framework.

Tripomatic\NetteApi integrates Assetic in Nette Framework in a minimalist way that allows using Assetic features without limitations. Configuration is fully compatible with the official Assetic package - no additional unnecessary conventions are introduced. Tripomatic\NetteApi also integrates asset routing for development environments and provides commands for asset dumping during production deployment.

Installation

Install Tripomatic\NetteAssetic using Composer:

Quickstart

Add NetteAssetic extension in your NEON config:

Configure assets in corresponding extension's section:

Include assets in your Latte template:

Configuration

Tripomatic\NetteAssetic provides easy and transparent configuration which is compatible with Assetic's settings.

Debug mode

Debug mode is set up automatically according to your application's debugMode. This behavior can be overriden:

Asset routing

In debug mode assets are automatically compiled and served to the ouptut with AssetRoute. This behavior can be overriden:

Filters

Assetic filters are fully supported. At first filters must be registered in a similar way as common services:

Then they can be assigned to assets:

Prefixing a filter name with ? cause the filter to be omitted in debug mode.

Workers

Assetic workers are fully supported. All assets will be passed to the worker's process() method. Typical example is the CacheBustingWorker:

Cache

Asset compiling and serving can be computationally expensive. Therefore, assets are cached and recompiled only when changed. By default assets are cached only in-memory with Assetic\Cache\ArrayCache. It's better to use a persistent cache that can keep data between two requests:

For a full list of cache implementations see https://github.com/kriswallsmith/assetic/tree/master/src/Assetic/Cache.

AssetRoute also automatically handles HTTP caching by using the correct cache-control headers. If an asset has not been modified the client receives HTTP/1.1 304 Not Modified.

Asset dumping

Although content and HTTP caching mechanisms can significantly speed up asset serving, there is still an overhead of running the application for every asset. Thus in production environments the assets should be dumped to a filesystem or CDN during deploy and served directly by HTTP server or CDN network.

The easiest option to dump all assets to their target location is using provided Symfony\Console command. NetteAssetic automatically registers the command in DI container so all that has to be done is to register the command to your console application instance:

Then the assets can be dumped with (supposing you run the Symfony\Console application from console.php):

Don't forget to add the above line to your deploy scripts.

List of configuration options

Listed below are all possible configuration options along with some example values:

FAQ

How do I include Bootstrap fonts or images?

For now you have to list them as assets with fixed output (Assetic itself doesn't have a better option for this):

License

Tripomatic\NetteAssetic is licensed under MIT.


All versions of nette-assetic with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
kriswallsmith/assetic Version ^1.2
nette/application Version ^2.3
nette/di Version ^2.3
nette/http Version ^2.3
latte/latte Version ^2.3
nette/php-generator Version ^2.3
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 tripomatic/nette-assetic contains the following files

Loading the files please wait ....