Skip to content

Commit

Permalink
Put source javascript into a new folder
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jul 9, 2024
1 parent 68679ea commit 5bc16b6
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
cache: yarn
node-version: "lts/*"
registry-url: https://registry.npmjs.org
cache-dependency-path: yarn.lock
cache-dependency-path: labextension/yarn.lock

- name: Update root build packages
run: |
Expand All @@ -60,7 +60,7 @@ jobs:
run: |
mkdir jsdist
cd jsdist
npm pack ../jupyter_launcher_shortcuts/labextension
npm pack ../labextension
sha256sum * | tee SHA256SUMS
- name: Upload Python artifact
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ instructions on how to make a release.

## Steps to make a release

1. Create a PR updating `yarn.lock` and continue only when its merged.
1. Create a PR updating `labextension/yarn.lock` and continue only when its merged.

This helps us avoid leaving known vulnerabilities are unfixed. To do this,
delete the file and manually perform the the `build dist` step in the
Expand All @@ -18,7 +18,7 @@ instructions on how to make a release.
```shell
# git clean -xfd can be needed to ensure yarn.lock
# gets re-created during pyproject-build
rm yarn.lock
rm labextension/yarn.lock

pip install --upgrade pip build
pyproject-build
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json → labextension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "jupyter_launcher_shortcuts/labextension"
"outputDir": "../jupyter_launcher_shortcuts/labextension"
},
"eslintIgnore": [
"node_modules",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ exclude = [".github"]

[tool.hatch.build.targets.wheel.shared-data]
"jupyter_launcher_shortcuts/labextension" = "share/jupyter/labextensions/jupyter_launcher_shortcuts"
"install.json" = "share/jupyter/labextensions/jupyter_launcher_shortcuts/install.json"
"labextension/install.json" = "share/jupyter/labextensions/jupyter_launcher_shortcuts/install.json"
"jupyter_launcher_shortcuts/etc/serverextension.json" = "etc/jupyter/jupyter_server_config.d/jupyter_launcher_shortcuts.json"


Expand All @@ -48,6 +48,7 @@ exclude = [".github"]
#
[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]
path = "labextension/package.json"


# jupyter-builder is used to ensure we build the jupyterlab extension when the
Expand All @@ -62,16 +63,18 @@ ensured-targets = [
"jupyter_launcher_shortcuts/labextension/static/style.js",
"jupyter_launcher_shortcuts/labextension/package.json",
]
skip-if-exists = ["jupyter_launcher_shortcuts/labextension/static/style.js"]
skip-if-exists = ["jupyter_launcher_shortcuts/labextension/package.json"]

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
path = "labextension"
build_cmd = "build:prod"
npm = ["jlpm"]

[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
path = "labextension"
build_cmd = "install:extension"
npm = ["jlpm"]
source_dir = "src"
source_dir = "labextension/src"
build_dir = "jupyter_launcher_shortcuts/labextension"


Expand Down

0 comments on commit 5bc16b6

Please sign in to comment.