webvariants / sly-assetic
AddOn for SallyCMS, handling assets using assetic
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Type:sallycms-addon
pkg:composer/webvariants/sly-assetic
Requires
- php: >=5.3.3
 - kriswallsmith/assetic: 1.1.1
 - sallycms/composer-installer: ~1.1
 - sallycms/console: >=0.9,<0.11
 - sallycms/sallycms: >=0.9,<0.11
 
This package is auto-updated.
Last update: 2020-08-10 14:15:18 UTC
README
1. Usage
- Define all your assets in 
develop/config/assetic.yml. Look for the example in the addondevelopdirectory. - Inherit your layout from 
sly_Layout_Asseticto use the methodsaddCSSAssetandaddJavaScriptAssetto add CSS and JS to your HTML. (Do not forget to callparent::__construct()ofsly_Layout_Assetic.) (ex.$layout->addCSSAsset('main.css')); - In developer mode all assets are build on the fly.
 - In production mode static files are served. You have to rebuild them manually
with the console:
php sally/console/bin/console assetic:rebuild
every time. The static files are placed inside the assets directory and prefixed with__assetic__.