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.

Source Distribution

baka_armor-0.1.dev0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

baka_armor-0.1.dev0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file baka_armor-0.1.dev0.tar.gz.

File metadata

File hashes

Hashes for baka_armor-0.1.dev0.tar.gz
Algorithm Hash digest
SHA256 196ea5cb7e9c4b2c47c5a61ea026bedfb5010ee678e3ca3f68a37b1fa44adbe9
MD5 4035e7bd81c6e4e09cce59aec6269258
BLAKE2b-256 f4b7f1a00075000c0e237d42aab0a7e62fd9dfff18ca8242c18359a77f2006ae

See more details on using hashes here.

File details

Details for the file baka_armor-0.1.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for baka_armor-0.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 efb35b47a1a8d8e15d89e4f9fa2519d2560c549007badd92d50df87fdebf6cfa
MD5 8539e8b8ea65f6e9930e72dd37422062
BLAKE2b-256 ad1c1f0f44e51c4bd035eafea669368bf4eced6dc59d79f9c98d32c21bd1317f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page