dev-master
9999999-devBundle all kinds of assets and enqueue them at once
MIT
The Requires
- php >=7
The Development Requires
wordpress assets
Bundle all kinds of assets and enqueue them at once
This is a small library that allows developers to create bundles of various asset types. Scripts, styles and other, custom asset types can be registered as a package. All assets are enqueued together when the AssetBundle is enqueued., (*1)
Fetch this package via composer:
composer require biont/wordpress-asset-bundles
, (*2)
$bundle => new AssetBundle( 'my_bundle', [ new Script( // Script handle 'my_asset_js', // Script path $asset_dir . 'js/asset.js', // Dependencies [ 'jquery' ] ), new Style( 'my_asset_css', $asset_dir . 'css/asset.css' ), ] ); $bundle->register(); // Call $bundle->enqueue() whenever you need your assets
Bundle all kinds of assets and enqueue them at once
MIT
wordpress assets