Skip to main content

Assets for Baka and Pyramid

Project description


baka_armor for baka framework or pyramid
------------------------------------------


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


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

.. code:: yaml
package: {your_root_package_or_egg}
armor:
config: configs # config folder
assets: assets # assets folder
bundles: assets.yaml # filename assets config
url: static
debug: False
manifest: file
cache: False
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-armor')


in development.ini


.. code::

pyramid.includes =
pyramid_debugtoolbar
baka_armor


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')



Project details


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_armor-0.1.dev1-py3-none-any.whl (16.7 kB) Copy SHA256 hash SHA256 Wheel py3 Apr 8, 2018
baka_armor-0.1.dev1.tar.gz (10.6 kB) Copy SHA256 hash SHA256 Source None Apr 8, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page