Dynamic asset mutation for Pyramid. Easily adds support for popular asset metalanguages such as CoffeeScript, SASS, SCSS, LESS, Dart, TypeScript, etc.
Project description
Synopsis
Pyramid AssetMutator provides simple and flexible asset mutation (also known as compiling or piping) for your Pyramid applications.
Inspired by other more powerful asset management packages, its goal is to provide Pyramid developers with a basic and straightforward mechanism for utilizing asset compilation (e.g. for CoffeeScript/Sass), minification (e.g. with jsmin), and optimization (e.g. with pngcrush).
As of version 0.3, it also adds experimental support for template language parsing (e.g. you could use Pyramid helpers like request.route_url() within your CoffeeScript files by using application.coffee.pt as the asset source filename).
Installation
To install, simply:
pip install pyramid_assetmutator
Documentation
You can read the documentation at: http://pyramid-assetmutator.curia.solutions/
Known Issues and Limitations
Experimental support for pypy.
Doesn’t clean up after itself by default (e.g. mutated assets aren’t removed automatically when the default settings are used).
Mutator “commands” must print to stdout (see the documentation for more info).
Hopefully obvious, but you must actually have the specified source compiler command installed and accessible from your working path in order for it to function.
Disclaimers and Warnings
This is Beta software–use at your own risk!
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Latest Changes
v1.0b1 – 2/22/2017
Added an always_remutate setting which provides the ability to specify assets that should always be remutated (even if a source file change was not detected).
Tweaked the output filename format for mutated files. The new format should be significantly more resistant to edge-case naming collisions when utilizing a remutate_check of exists.
Renamed the (default) mtime value for the remutate_check setting to stat. It now checks both the size and last modified time of the asset source file.
The asset_paths setting has been merged into the each_boot setting. Now instead of receiving a boolean, each_boot must receive a list specifying assets that should be checked/mutated when the application boots.
Renamed the asset_prefix setting to mutated_file_prefix in an effort to be more explicit.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyramid_assetmutator-1.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52e75ae7b536e613c59584d705b9e86f1436e2582f72b741c6d7ba58e5527d00 |
|
MD5 | c4e760af6c5eb5d578458fce0b7276b5 |
|
BLAKE2b-256 | 6d44c644f11bfad1d0d8c6a05f3e84f7e0132e17a20462fb7dfa9b6f6c095f5e |
Hashes for pyramid_assetmutator-1.0b1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce1ce0f7191653fc9ce92586e69210b0a786a7b8d61e48c84f0654ae398ff2ce |
|
MD5 | 236f9d049430f2620912c6dab768a1eb |
|
BLAKE2b-256 | f9196b1deb95bfa4945400191d93ee9e4a7a4ef5fa5f2e31a8b15458e4e06583 |