Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Assets for Baka and Pyramid

Project Description

baka_assets for baka framework or pyramid
------------------------------------------


Management assets for baka framework and Pyramid using
`webassets <http://webassets.readthedocs.org>`_.


Basic usage
```````````

.. code:: python

baka_assets.config = {your_root_package_or_egg}:configs
baka_assets.assets = {your_root_package_or_egg}:assets

baka_assets.bundles = assets.yaml
baka_assets.url = static
baka_assets.debug = False
baka_assets.manifest = file
baka_assets.cache = False
baka_assets.auto_build = True


in assets.yaml

.. code::

css-vendor:
filters: scss,cssmin
depends: '**/*.scss'
output: {your_root_package_or_egg}:public/vendor.%(version)s.css
contents: styles/app.scss


js-vendor:
config:
UGLIFYJS_BIN: ./node_modules/.bin/uglifyjs
filters: uglifyjs
output: {your_root_package_or_egg}:public/vendor.%(version)s.js
contents:
- javascripts/pace.js
- javascripts/moment-with-locales.js
- javascripts/jquery.js
- javascripts/handlebars.js
- javascripts/handlers-jquery.js
- javascripts/cookies.js
- javascripts/lodash.js
- javascripts/materialize.js


setup to config
```````````````
in python code


.. code:: python

config.include('baka_assets')


in development.ini


.. code::

pyramid.includes =
pyramid_debugtoolbar
baka_assets


Usage in mako template
```````````````````````

.. code::
% for url in request.web_env['js-vendor'].urls():
<script src="${request.static_url(url)}" />
% endfor


.. code:: python

js = Bundle('js/main.js', filters='uglifyjs', output='bundle.js',
depends='js/**/*.js')

Release History

This version
History Node

0.3.6.dev2

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
baka_assets-0.3.6.dev2-py2.py3-none-any.whl
(5.7 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Apr 5, 2017
baka_assets-0.3.6.dev2.tar.gz
(4.3 kB) Copy SHA256 Hash SHA256
Source None Apr 5, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting