Skip to content

adambisek/gulp-assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages