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
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
baka_armor-0.1.dev0.tar.gz
(10.5 kB
view details)
Built Distribution
File details
Details for the file baka_armor-0.1.dev0.tar.gz
.
File metadata
- Download URL: baka_armor-0.1.dev0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 196ea5cb7e9c4b2c47c5a61ea026bedfb5010ee678e3ca3f68a37b1fa44adbe9 |
|
MD5 | 4035e7bd81c6e4e09cce59aec6269258 |
|
BLAKE2b-256 | f4b7f1a00075000c0e237d42aab0a7e62fd9dfff18ca8242c18359a77f2006ae |
File details
Details for the file baka_armor-0.1.dev0-py3-none-any.whl
.
File metadata
- Download URL: baka_armor-0.1.dev0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efb35b47a1a8d8e15d89e4f9fa2519d2560c549007badd92d50df87fdebf6cfa |
|
MD5 | 8539e8b8ea65f6e9930e72dd37422062 |
|
BLAKE2b-256 | ad1c1f0f44e51c4bd035eafea669368bf4eced6dc59d79f9c98d32c21bd1317f |