Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a note about schema inclusion rule #266

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions main-menu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,35 @@ in the web browser console.
```
jlab-examples:main-menu has been called from the menu.
```

**WARNING** The schema must be included in the final bundle, and the location of the
schema directory needs to be provided to the JupyterLab extension build system.

To achieve this, the `package.json` must include:

- `"schema/*.json"` entry in the `files` section
- `schemaDir` key with path to the schema directory in the `jupyterlab` section

<!-- prettier-ignore-start -->
```json5
// package.json#L16-L20

"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
"schema/*.json"
],
```
<!-- prettier-ignore-end -->

<!-- prettier-ignore-start -->
```json5
// package.json#L94-L98

"jupyterlab": {
"extension": true,
"outputDir": "jupyterlab_examples_main_menu/labextension",
"schemaDir": "schema"
},
```
<!-- prettier-ignore-end -->
Loading