Skip to content

Commit

Permalink
Use minified Tabulator JS (#6060)
Browse files Browse the repository at this point in the history
* Use minified Tabulator JS

* Update tests
  • Loading branch information
philippjfr committed Dec 18, 2023
1 parent 8e4dd14 commit 9efa89e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion panel/models/tabulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

TABULATOR_VERSION = "5.5.0"

JS_SRC = f"{config.npm_cdn}/tabulator-tables@{TABULATOR_VERSION}/dist/js/tabulator.js"
JS_SRC = f"{config.npm_cdn}/tabulator-tables@{TABULATOR_VERSION}/dist/js/tabulator.min.js"
MOMENT_SRC = f"{config.npm_cdn}/luxon/build/global/luxon.min.js"

THEME_PATH = f"tabulator-tables@{TABULATOR_VERSION}/dist/css/"
Expand Down
6 changes: 3 additions & 3 deletions panel/tests/io/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_resources_model_server(document):
with set_curdoc(document):
extension('tabulator')
assert resources.js_files[:2] == [
'static/extensions/panel/bundled/datatabulator/tabulator-tables@5.5.0/dist/js/tabulator.js',
'static/extensions/panel/bundled/datatabulator/tabulator-tables@5.5.0/dist/js/tabulator.min.js',
'static/extensions/panel/bundled/datatabulator/luxon/build/global/luxon.min.js',
]
assert resources.css_files == [
Expand All @@ -95,7 +95,7 @@ def test_resources_model_cdn(document):
with set_curdoc(document):
extension('tabulator')
assert resources.js_files[:2] == [
f'{CDN_DIST}bundled/datatabulator/tabulator-tables@5.5.0/dist/js/tabulator.js',
f'{CDN_DIST}bundled/datatabulator/tabulator-tables@5.5.0/dist/js/tabulator.min.js',
f'{CDN_DIST}bundled/datatabulator/luxon/build/global/luxon.min.js',
]
assert resources.css_files == [
Expand All @@ -108,7 +108,7 @@ def test_resources_model_inline(document):
with set_curdoc(document):
extension('tabulator')
assert resources.js_raw[-2:] == [
(DIST_DIR / 'bundled/datatabulator/tabulator-tables@5.5.0/dist/js/tabulator.js').read_text(encoding='utf-8'),
(DIST_DIR / 'bundled/datatabulator/tabulator-tables@5.5.0/dist/js/tabulator.min.js').read_text(encoding='utf-8'),
(DIST_DIR / 'bundled/datatabulator/luxon/build/global/luxon.min.js').read_text(encoding='utf-8')
]
assert resources.css_raw == [
Expand Down

0 comments on commit 9efa89e

Please sign in to comment.