-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
121 lines (89 loc) · 2.94 KB
/
setup.py
File metadata and controls
121 lines (89 loc) · 2.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- coding: utf-8 -*-
"""
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')
"""
from setuptools import setup, find_packages
setup(name='baka_assets',
version='0.3.9.1',
description='Assets for Baka and Pyramid',
long_description=__doc__,
author='Nanang Suryadi',
license='MIT',
author_email='nanang.jobs@gmail.com',
url='https://github.com/baka-framework/baka_assets',
packages=find_packages(),
keywords=['webpack', 'webassets', 'baka assets', 'pyramid assets'],
install_requires=['pyramid',
'webassets',
'six',
'PyYAML',
'pyScss',
'PyExecJS',
'jsmin',
'cssmin',
'plim'],
test_suite='',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
])