Skip to content

Commit 18f70ac

Browse files
committed
AUpdate file structure and make package include jupyterlab files
1 parent 4a2f699 commit 18f70ac

File tree

9 files changed

+50
-33
lines changed

9 files changed

+50
-33
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ doc/.ipynb_checkpoints
6060
tags
6161
doc/check-or-enforce-order.py
6262
plotly/package_data/widgetbundle.js
63-
plotly/labextension/static
64-
plotly/labextension/lib
63+
plotly/labextension/*
6564

6665
tests/percy/*.html
6766
tests/percy/pandas2/*.html

js/install.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"schemaVersion": 1,
3+
"name": "jupyterlab-plotly",
4+
"version": "6.0.1",
5+
"jupyterlab": {
6+
"mimeExtension": "lib/mimeExtension.js"
7+
}
8+
}
9+
File renamed without changes.

js/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "jupyterlab-plotly",
3+
"version": "0.1.0",
4+
"main": "lib/mimeExtension.js",
5+
"scripts": {
6+
"build:widget": "esbuild --bundle --alias:plotly.js=plotly.js/dist/plotly --format=esm --minify --outfile=../plotly/package_data/widgetbundle.js src/widget.ts",
7+
"build:mimerenderer": "esbuild --bundle --alias:plotly.js=plotly.js/dist/plotly --format=esm --minify --outfile=../plotly/labextension/lib/mimeExtension.js src/mimeExtension.ts",
8+
"build:labextension": "jupyter labextension build .",
9+
"build": "npm run build:widget && npm run build:mimerenderer && npm run build:labextension",
10+
"watch": "npm run build -- --watch --sourcemap=inline",
11+
"typecheck": "tsc --noEmit"
12+
},
13+
"dependencies": {
14+
"lodash-es": "^4.17.21",
15+
"plotly.js": "3.0.1",
16+
"@lumino/widgets": "~2.4.0"
17+
},
18+
"devDependencies": {
19+
"@jupyterlab/builder": "^4.3.6 || ^3.6.8",
20+
"@types/plotly.js": "^2.33.4",
21+
"esbuild": "^0.23.1",
22+
"typescript": "^5.6.2"
23+
},
24+
"jupyterlab": {
25+
"mimeExtension": true,
26+
"outputDir": "../plotly/labextension"
27+
}
28+
}
29+
File renamed without changes.
File renamed without changes.
File renamed without changes.

plotly/labextension/package.json

Lines changed: 0 additions & 27 deletions
This file was deleted.

pyproject.toml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "jupyter_packaging~=0.10.0", "wheel"]
2+
requires = ["setuptools>=61", "jupyter_packaging~=0.10.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project.urls]
@@ -86,9 +86,6 @@ exclude = '''
8686
)
8787
'''
8888

89-
[tool.jupyter-packaging.options]
90-
skip-if-exists = ["plotly/labextension/static/style.js"]
91-
9289
[tool.jupyter-packaging.builder]
9390
factory = "jupyter_packaging.npm_builder"
9491

@@ -101,3 +98,13 @@ build_cmd = "build"
10198
npm = ["jlpm"]
10299
source_dir = "js"
103100
build_dir = "plotly/labextension"
101+
102+
[tool.setuptools.data-files]
103+
"share/jupyter/labextensions/jupyterlab-plotly" = [
104+
"plotly/labextension/package.json",
105+
"js/install.json"
106+
]
107+
108+
"share/jupyter/labextensions/jupyterlab-plotly/static" = [
109+
"plotly/labextension/static/*.js"
110+
]

0 commit comments

Comments
 (0)