-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathassets.py
executable file
·43 lines (35 loc) · 1.11 KB
/
assets.py
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
# -*- coding: utf-8 -*-
#
# assets.py
#
# Copyright 2016 Socos LLC
#
from os import path
from flask_assets import Bundle, Environment
from flask import Flask
def init(app=None):
app = app or Flask(__name__)
with app.app_context():
env = Environment(app)
env.directory = 'aqandu/static'
env.load_path = [path.join(path.dirname(__file__), 'aqandu/static')]
env.auto_build = False # App Engine doesn't support automatic rebuilding.
env.versions = 'hash'
env.manifest = 'file'
all_css = Bundle(
'css/airu.css',
'css/visualization.css',
'css/ie10-viewport-bug-workaround.css',
filters='cssmin', output='css/all_css.%(version)s.css')
env.register('css', all_css)
all_js = Bundle(
'js/db_data.js',
'js/map_reconfigure.js',
filters='jsmin', output='js/all_js.%(version)s.js')
env.register('js', all_js)
bundles = [all_css, all_js]
return bundles
if __name__ == '__main__':
bundles = init()
for bundle in bundles:
bundle.build()