Skip to content

Commit

Permalink
Add a note about schema inclusion rule (#266)
Browse files Browse the repository at this point in the history
* Add a note about schema inclusion rule

* Expand on schema requirements

* Lint
  • Loading branch information
krassowski authored Jul 22, 2024
1 parent 871fbe1 commit 8782017
Showing 1 changed file with 32 additions and 0 deletions.
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 -->

0 comments on commit 8782017

Please sign in to comment.