Skip to content

Commit 2335df7

Browse files
committed
Add a screenshot for the end result
1 parent 3f2c5af commit 2335df7

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

docs/source/examples/Widget Custom.ipynb

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"github_project_name []: ipyemail\n",
9494
"github_organization_name []: \n",
9595
"python_package_name [ipyemail]:\n",
96-
"npm_package_name [ipyemail]:\n",
96+
"npm_package_name [ipyemail]: jupyter-email\n",
9797
"npm_package_version [0.1.0]:\n",
9898
"project_short_description [A Custom Jupyter Widget Library]: An Custom Email Widget\n",
9999
"```\n",
@@ -124,7 +124,7 @@
124124
"\n",
125125
"You also need to enable the widget frontend extension.\n",
126126
"\n",
127-
"If you are using JupyterLab:\n",
127+
"If you are using JupyterLab 2.x:\n",
128128
"\n",
129129
"```bash\n",
130130
"# install the widget manager to display the widgets in JupyterLab\n",
@@ -134,7 +134,7 @@
134134
"jupyter labextension install .\n",
135135
"```\n",
136136
"\n",
137-
"If you are using the classic notebook:\n",
137+
"If you are using the Classic Notebook:\n",
138138
"\n",
139139
"```bash\n",
140140
"jupyter nbextension install --sys-prefix --symlink --overwrite --py ipyemail\n",
@@ -467,14 +467,27 @@
467467
}
468468
},
469469
"source": [
470-
"## Test"
470+
"## Test\n",
471+
"\n",
472+
"First, run the following command to recreate the frontend bundle:\n",
473+
"\n",
474+
"```bash\n",
475+
"npm run build\n",
476+
"```\n",
477+
"\n",
478+
"If you use JupyterLab, you might want to use `jlpm` as the npm client. `jlpm` uses `yarn` under the hood as the package manager. The main difference compared to `npm` is that `jlpm` will generate a `yarn.lock` file for the dependencies, instead of `package-lock.json`. With `jlpm` the command is:\n",
479+
"\n",
480+
"\n",
481+
"```bash\n",
482+
"jlpm run build\n",
483+
"```"
471484
]
472485
},
473486
{
474487
"cell_type": "markdown",
475488
"metadata": {},
476489
"source": [
477-
"You should be able to display your widget just like any other widget now:\n",
490+
"After reloading the page, you should be able to display your widget just like any other widget now:\n",
478491
"\n",
479492
"```python\n",
480493
"from ipyemail import Email\n",
@@ -706,6 +719,15 @@
706719
"```"
707720
]
708721
},
722+
{
723+
"cell_type": "markdown",
724+
"metadata": {},
725+
"source": [
726+
"The end result should look like the following:\n",
727+
" \n",
728+
"![end-result](./images/custom-widget-result.png)"
729+
]
730+
},
709731
{
710732
"cell_type": "markdown",
711733
"metadata": {},
61.2 KB
Loading

0 commit comments

Comments
 (0)