-
Notifications
You must be signed in to change notification settings - Fork 125
Shell
Asset Compress includes a Shell that can be used to create and clear build files. You can realize considerable performance boosts by using the shell to generate compiled assets before you deploy. Static assets that are minified and concatenated reduce page size and improve actual and perceived page performance.
Using the shell to build files is ideal when you want to integrate with a build or deployment script. The build task will generate all the assets defined in your Configuration file:
bin/cake asset_compress build
All generated files will be put into the configured cache directories. By default, the build shell will skip re-building files that don't appear to have any changes. The shell compares the mtime of the build file, and the component files. If all of the components have an older time than the build file, the build file will not be regenerated. You can suppress this behavior using the force
option.
bin/cake asset_compress build --force
You may want to clear the generated files. Only files defined in the Configuration file will be cleared. Use the following:
bin/cake asset_compress clear