2018-06-10 13:16:28 +00:00
|
|
|
from flask_assets import Bundle, Environment, Filter
|
|
|
|
|
2019-12-17 16:46:34 +00:00
|
|
|
|
2018-06-10 13:16:28 +00:00
|
|
|
class ConcatFilter(Filter):
|
2023-03-11 13:48:19 +00:00
|
|
|
"""
|
|
|
|
Filter that merges files, placing a semicolon between them.
|
|
|
|
"""
|
|
|
|
def concat(self, out, hunks, **kw):
|
|
|
|
out.write(';'.join([h.data() for h, info in hunks]))
|
2018-06-10 13:16:28 +00:00
|
|
|
|
|
|
|
|
2023-02-18 16:04:14 +00:00
|
|
|
css_login = Bundle(
|
2023-03-11 13:48:19 +00:00
|
|
|
'node_modules/@fortawesome/fontawesome-free/css/all.css',
|
|
|
|
'node_modules/icheck/skins/square/blue.css',
|
|
|
|
'node_modules/admin-lte/dist/css/adminlte.css',
|
|
|
|
filters=('rcssmin', 'cssrewrite'),
|
|
|
|
output='generated/login.css')
|
2018-06-10 13:16:28 +00:00
|
|
|
|
2023-02-18 16:04:14 +00:00
|
|
|
js_login = Bundle(
|
2023-03-11 13:48:19 +00:00
|
|
|
'node_modules/jquery/dist/jquery.js',
|
|
|
|
'node_modules/bootstrap/dist/js/bootstrap.js',
|
|
|
|
'node_modules/icheck/icheck.js',
|
2023-04-09 14:11:00 +00:00
|
|
|
'node_modules/knockout/build/output/knockout-latest.js',
|
2023-03-11 13:48:19 +00:00
|
|
|
'custom/js/custom.js',
|
|
|
|
filters=(ConcatFilter, 'rjsmin'),
|
|
|
|
output='generated/login.js')
|
2019-12-17 16:46:34 +00:00
|
|
|
|
2023-02-18 16:04:14 +00:00
|
|
|
js_validation = Bundle(
|
2023-03-11 13:48:19 +00:00
|
|
|
'node_modules/bootstrap-validator/dist/validator.js',
|
|
|
|
output='generated/validation.js')
|
2018-08-19 15:08:14 +00:00
|
|
|
|
2018-06-10 13:16:28 +00:00
|
|
|
css_main = Bundle(
|
2023-03-11 13:48:19 +00:00
|
|
|
'node_modules/@fortawesome/fontawesome-free/css/all.css',
|
|
|
|
'node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css',
|
|
|
|
'node_modules/icheck/skins/square/blue.css',
|
|
|
|
'node_modules/multiselect/css/multi-select.css',
|
|
|
|
'node_modules/admin-lte/dist/css/adminlte.css',
|
|
|
|
'custom/css/custom.css',
|
|
|
|
'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.css',
|
|
|
|
filters=('rcssmin', 'cssrewrite'),
|
|
|
|
output='generated/main.css')
|
2018-06-10 13:16:28 +00:00
|
|
|
|
2023-02-18 16:04:14 +00:00
|
|
|
js_main = Bundle(
|
2023-03-11 13:48:19 +00:00
|
|
|
'node_modules/jquery/dist/jquery.js',
|
|
|
|
'node_modules/jquery-ui-dist/jquery-ui.js',
|
|
|
|
'node_modules/bootstrap/dist/js/bootstrap.bundle.js',
|
|
|
|
'node_modules/datatables.net/js/jquery.dataTables.js',
|
|
|
|
'node_modules/datatables.net-bs4/js/dataTables.bootstrap4.js',
|
|
|
|
'node_modules/jquery-sparkline/jquery.sparkline.js',
|
|
|
|
'node_modules/jquery-slimscroll/jquery.slimscroll.js',
|
|
|
|
'node_modules/icheck/icheck.js',
|
|
|
|
'node_modules/fastclick/lib/fastclick.js',
|
|
|
|
'node_modules/moment/moment.js',
|
|
|
|
'node_modules/admin-lte/dist/js/adminlte.js',
|
|
|
|
'node_modules/multiselect/js/jquery.multi-select.js',
|
|
|
|
'node_modules/datatables.net-plugins/sorting/natural.js',
|
|
|
|
'node_modules/jtimeout/src/jTimeout.js',
|
|
|
|
'node_modules/jquery.quicksearch/src/jquery.quicksearch.js',
|
2023-04-09 14:11:00 +00:00
|
|
|
'node_modules/knockout/build/output/knockout-latest.js',
|
2023-03-11 13:48:19 +00:00
|
|
|
'custom/js/custom.js',
|
|
|
|
'node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
|
|
|
|
filters=(ConcatFilter, 'rjsmin'),
|
|
|
|
output='generated/main.js')
|
2018-06-10 13:16:28 +00:00
|
|
|
|
|
|
|
assets = Environment()
|
|
|
|
assets.register('js_login', js_login)
|
2018-08-19 15:08:14 +00:00
|
|
|
assets.register('js_validation', js_validation)
|
2018-06-10 13:16:28 +00:00
|
|
|
assets.register('css_login', css_login)
|
|
|
|
assets.register('js_main', js_main)
|
|
|
|
assets.register('css_main', css_main)
|