This repository has been archived by the owner on Oct 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassets.py
44 lines (37 loc) · 2.4 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
44
from flask_assets import Environment, Bundle
assets_folder = '../assets/'
def assets(app):
environment = Environment(app)
environment.url = "/static"
# environment.config['COMPASS_CONFIG'] = {"sass_dir": environment.directory+"../../assets/sass"}
# print(environment.directory)
css_main = Bundle(assets_folder + 'sass/app.scss', filters='scss' if app.debug else 'scss,cssmin', depends=(assets_folder + 'sass/*.scss', assets_folder + 'sass/**/*.scss'), output='css/gen/main.%(version)s.css')
environment.register('css_main', css_main)
js_base = Bundle(assets_folder + 'js/vendor/custom.modernizr.js',
assets_folder + 'js/junction/molecular.js',
assets_folder + 'js/vendor/jquery.js',
assets_folder + 'js/vendor/jquery.multi-select.js',
assets_folder + 'js/vendor/angular.js',
assets_folder + 'js/vendor/typeahead.js',
# assets_folder + 'js/vendor/snowstorm.js',
assets_folder + 'js/foundation/foundation.js',
assets_folder + 'js/foundation/foundation.topbar.js',
assets_folder + 'js/foundation/foundation.dropdown.js',
assets_folder + 'js/foundation/foundation.abide.js',
assets_folder + 'js/foundation/foundation.joyride.js',
assets_folder + 'js/foundation/foundation.orbit.js',
assets_folder + 'js/foundation/foundation.tab.js',
assets_folder + 'js/foundation/foundation.reveal.js',
assets_folder + 'js/foundation/foundation.alert.js',
assets_folder + 'js/foundation/foundation.tooltip.js',
assets_folder + 'js/foundation/foundation.accordion.js',
assets_folder + 'js/junction/editable.js',
assets_folder + 'js/junction/notifications.js',
assets_folder + 'js/junction/app.js')
js_main = Bundle(js_base, filters=None if app.debug else 'rjsmin', output='js/gen/app.%(version)s.js')
environment.register('js_main', js_main)
js_graphs = Bundle(assets_folder + 'js/vendor/d3.js',
assets_folder + 'js/junction/alts_graph.js',
filters=None, output='js/gen/graphs.%(version)s.js')
environment.register('js_graphs', js_graphs)
return environment