Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Komponenta pro Nette Framework načítající skripty a styly
PHP
tag: 2.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
WebLoader
tests
composer.json
readme.txt

readme.txt

WebLoader
=========

Component for CSS and JS files loading

Author: Jan Marek
Licence: MIT

Example:

	<?php

	// presenter factory in nette

	protected function createComponentCss()
	{
		$files = new WebLoader\FileCollection(WWW_DIR . '/css');
		$files->addFiles(array(
			'style.css',
			WWW_DIR . '/colorbox/colorbox.css',
		));

		$compiler = WebLoader\Compiler::createCssCompiler($files, WWW_DIR . '/temp');

		$compiler->addFilter(new WebLoader\Filter\VariablesFilter(array('foo' => 'bar'));
		$compiler->addFilter(function ($code) {
			return cssmin::minify($code, "remove-last-semicolon");
		});

		$control = new WebLoader\Nette\CssLoader($compiler, '/webtemp');
		$control->setMedia('screen');

		return $control;
	}

Template:

	{control css}
Something went wrong with that request. Please try again.