Statistics
542
0
0
1.3y
Badges
Dependencies

gulp-assets

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

This component is intended to use with Nette Framework. When you are using gulp for processing assets, you don't need Webloader anymore. Simply link gulp processed assets to page. Adds file hash into query string to force refresh after gulp process new files.

Installation

Preferred installation is with Composer.

composer require adambisek/gulp-assets

Usage

config.neon -> simple define output gulp files a define factory service

parameters:
	assetsFactory:
		basePath: '%appDir%/../public'
		front:
			css:
				dist/front/front.bundle.css: all
				dist/front/front-print.bundle.css: all
			js:
				- dist/front/front.bundle.js

services:
	- GulpAssets\ControlFactory(%assetsFactory%)

BasePresenter -> create renderable components with factory service

public function createComponentCss()
{
	return $this->assetsControlFactory->createCssControl('front');
}

public function createComponentJs()
{
	return $this->assetsControlFactory->createJsControl('front');
}

Template (Latte):

<html>
	<head>
		{control js}
		{control css}
	</head>
	<body> ... </body>
</html>

No release at this moment. Try to create first one.

Is this addon outdated? Did you find an issue? Please report it.

Componette Componette admin@componette.com