Skip to content

Commit e4194a5

Browse files
committed
Remove requirejs as dependency (shiny now includes it and provides a shim for define()ing anonymous modules)
1 parent 405d5e3 commit e4194a5

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

ipyshiny/_dependencies.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@
2222
# TODO: scripts/static_download.R should produce/update these
2323
def libembed_dependency() -> List[HTMLDependency]:
2424
return [
25-
# Load 3rd party widget dependencies at runtime via requirejs. One of the benefits of doing it
26-
# this way is that for whatever reason, if we can't find the widgets statically assets locally,
27-
# the requireLoader we use client side will fallback to loading the dependencies from a CDN.
28-
HTMLDependency(
29-
name="requirejs",
30-
version="2.3.4",
31-
source={"package": "ipyshiny", "subdir": "static"},
32-
script={"src": "require.min.js"},
33-
),
3425
# Jupyter Notebook/Lab both come "preloaded" with several @jupyter-widgets packages
3526
# (i.e., base, controls, output), all of which are bundled into this extension.js file
3627
# provided by the widgetsnbextension package, which is a dependency of ipywidgets.

ipyshiny/static/require.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

scripts/static_download.R

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11

22
static_dir <- file.path(getwd(), "ipyshiny", "static")
33
if (!dir.exists(static_dir)) dir.create(static_dir)
4-
# From https://github.com/jupyter-widgets/ipywidgets/blob/fbdbd005/python/ipywidgets/ipywidgets/embed.py#L32
5-
download.file(
6-
"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js",
7-
file.path(static_dir, "require.min.js")
8-
)
94
# From https://github.com/jupyter-widgets/ipywidgets/blob/fbdbd005/python/ipywidgets/ipywidgets/embed.py#L62
105
# Note that we also grab libembed-amd, not embed-amd, because the Shiny bindings handle the actual rendering aspect
116
# https://github.com/jupyter-widgets/ipywidgets/blob/fbdbd00/packages/html-manager/scripts/concat-amd-build.js#L6

0 commit comments

Comments
 (0)