Skip to content

Webpack Asset handling plugin for CakePHP. It takes an exported manifest.json file and then automatically loads all assets for an specified entry point.

License

Notifications You must be signed in to change notification settings

pcuser42/cakephp-webpack-asset-loader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov

WebpackAssetLoader plugin for CakePHP

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require pcuser42/cakephp-webpack-asset-loader

Use

Load the plugin in Application

$this->addPlugin('Pcuser42/WebpackAssetLoader');

Load the helper in AppView

$this->loadHelper('Pcuser42/WebpackAssetLoader.Asset');

Load all assets for an entrypoint in your template file:

<?=$this->Asset->loadEntry('app')?>

Or load assets and output them one type at a time in your view file:

$this->Asset->loadEntryDeferred('app');
...
<?=$this->Asset->getDeferredEntries('js')?>
...
<?=$this->Asset->getDeferredEntries('css')?>

About

Webpack Asset handling plugin for CakePHP. It takes an exported manifest.json file and then automatically loads all assets for an specified entry point.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%