Content delivery network Concept supporting resource offload
The p01.recipe.cdn:app recipe generates a script which is able to extract content delivery resources defined by the p01.cdn meta directives from a project to a given folder. Additional there is a minify recipe which generates a minify script which is able to collect resources from a local project or released python packages, minify and bundle them. And there is a glue recipe which is able to generate sprite images. In short words, three is everything you will need to generate and extract resources for a content delivery network.
This buildout recipe package offers 3 different concepts. This 3 concept allows you to reduce the resources size and offload the resources from your application server. The nice thing is, that you can start your application with different configurations if you like to server the minified and static or the local non monified resource versions. The p01.cdn package also offers a version manager which allows to use different resource versioning concepts.
Since version 1.0.0 this package is offering versiong per file and doesn’t require to use one version for all resources. The optinal p01.recipe.cdn:setup recipe creates a script which is able to generate a version map and the related zrt-replace directives and stores them in a json data map and a less file which can get included in your related less files.
The first concept allows to generate sprite images and the relevant css styles pointing to the right sprite background position. This recipe uses the spritemapper python package
jsmin: http://pypi.python.org/pypi/jsmin lpjsmin: http://pypi.python.org/pypi/lpjsmin slimit: http://pypi.python.org/pypi/slimit cssmin: http://pypi.python.org/pypi/cssmin
content delivery network
The third concept allows to extract CDN (content delivery network) resources based on p01.cdn into a folder structure.
- bugfix: fix broken i18n cdn resource path extraction
- feature: use better error message if a zrt-resource include fails because of a missing resource (adapter) lookup.
- feature: check version before write the verisons and zrt-replace directives the the related files. This prevents that the less compiler get invoked for nothing because fo the modified zrt-replace.less file.
- bugfix: fix i18n resource extraction
- feature: support pkg, file include in header option. This allows us to include files with generated zrt-replace arguments. One usecase for this new option is the new cdn extraction concept which is able to version each resource file based on subversion version or the related package version. This new concept generates a file including all the related zrt-replace.less rules.
- feature: switch to json config file based minify script processing. This allows us to use larger headers and source files and isn’t limited by cmd line length.
- feature: added option for extract each resource with it’s own version based on subversion version. See p01.cdn version 1.0.0 for support cdn resources.
- feature: generate zrt-replace.less for extracted resources including all the related zrt-replace rules. This file can get included as header option in the p01.recipe.cdn:minify recipe
- bugfix: support missing parser instance. The parser was missing for show an error message, e.g. missing directory path
- extract: print the current layer
- bugfix: The skip option didn’t work. Now you can define optional files by it’s filename and the minify script will only include this skipped files and not minify the file source.
- bugfix: The libs option didn’t work. Now you can define different minify libraries for each file.
- Output the resource parameters when extract fails
- bugfix: use an empty list as default skip option and not None
- feature: support skip option in extract recipe. This allows to define a list of filenames thcih get not extracted to the output. This allows to skip the source files from get deployed to the cdn output folder.
- feature: support slimit mangle, mangle_toplevel and cssmin wrap options. You can use them as slimit_mangle, slimit_mangle_toplevel and cssmin_wrap in your buildout.
- improve error handling, show traceback from executed method
- initial release