From 5c249105b11cd66f016877ea05ee05d87fb15eef Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 8 Oct 2024 17:49:48 +0000 Subject: [PATCH 1/5] update link to the demo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 762c7b1..8c825f9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # jupyterlite-terminal [![Github Actions Status](https://github.com/jupyterlite/terminal/workflows/Build/badge.svg)](https://github.com/jupyterlite/terminal/actions/workflows/build.yml) -[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite.github.io/terminal/lab/index.html) +[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://jupyterlite-terminal.vercel.app/) A terminal for JupyterLite. From 16380f32c41177955ce130c9daefaa7bd4d450aa Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 8 Oct 2024 18:06:19 +0000 Subject: [PATCH 2/5] Add demo files --- demo/contents/fact.lua | 8 ++++++++ demo/contents/months.txt | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 demo/contents/fact.lua create mode 100644 demo/contents/months.txt diff --git a/demo/contents/fact.lua b/demo/contents/fact.lua new file mode 100644 index 0000000..a7e0449 --- /dev/null +++ b/demo/contents/fact.lua @@ -0,0 +1,8 @@ +function fact(n, acc) + acc = acc or 1 + if n == 0 then + return acc + end + return fact(n-1, n*acc) +end +print(fact(tonumber(arg[1]))) diff --git a/demo/contents/months.txt b/demo/contents/months.txt new file mode 100644 index 0000000..9b28fd0 --- /dev/null +++ b/demo/contents/months.txt @@ -0,0 +1,12 @@ +August +November +March +January +July +May +October +February +December +April +September +June From f9dd2ecb9f1ce9ebc39c86aca7e1aa7ad803833e Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 8 Oct 2024 18:10:23 +0000 Subject: [PATCH 3/5] add files --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index e3cc36b..c57652f 100644 --- a/deploy.sh +++ b/deploy.sh @@ -22,4 +22,4 @@ python -m pip install -r requirements-deploy.txt # build the JupyterLite site jupyter lite --version -jupyter lite build --output-dir dist +jupyter lite build --contents demo/contents --output-dir dist From b9de33ba07ce8b1a5aba8f384426eb87d796bf9f Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 8 Oct 2024 18:16:22 +0000 Subject: [PATCH 4/5] move demo files to demo --- .gitignore | 1 + README.md | 3 ++- deploy.sh => demo/deploy.sh | 2 +- requirements-deploy.txt => demo/requirements-deploy.txt | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) rename deploy.sh => demo/deploy.sh (91%) rename requirements-deploy.txt => demo/requirements-deploy.txt (95%) diff --git a/.gitignore b/.gitignore index 461d437..0a5f6c4 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,4 @@ dmypy.json _output/ cockle_wasm_env/ cockle-config.json +demo/dist \ No newline at end of file diff --git a/README.md b/README.md index 8c825f9..ca09669 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,12 @@ jupyter lite build If you would like to deploy a JupyterLite site with the terminal extension, you will need to configure your server to add the `Cross-Origin-Embedder-Policy` and `Cross-Origin-Opener-Policy` headers. -As an example, this repository deploys the JupyterLite terminal to [Vercel](https://vercel.com), using the following files: +As an example, this repository deploys the JupyterLite terminal to [Vercel](https://vercel.com), using the following files in the `demo` folder: - `vercel.json`: configure the COOP / COEP server headers - `requirements-deploy.txt`: dependencies for the JupyterLite deployment - `deploy.sh`: script to deploy to Vercel, using micromamba to have full control on the Python versions and isolate the build in a virtual environment +- the `contents` directory contains a couple of demo files to try some commands such as `grep`, `echo` and `lua` For more information, have a look at the JupyterLite documentation: https://jupyterlite.readthedocs.io/ diff --git a/deploy.sh b/demo/deploy.sh similarity index 91% rename from deploy.sh rename to demo/deploy.sh index c57652f..48f7e1e 100644 --- a/deploy.sh +++ b/demo/deploy.sh @@ -22,4 +22,4 @@ python -m pip install -r requirements-deploy.txt # build the JupyterLite site jupyter lite --version -jupyter lite build --contents demo/contents --output-dir dist +jupyter lite build --contents contents --output-dir dist diff --git a/requirements-deploy.txt b/demo/requirements-deploy.txt similarity index 95% rename from requirements-deploy.txt rename to demo/requirements-deploy.txt index 3748bdf..53b02a2 100644 --- a/requirements-deploy.txt +++ b/demo/requirements-deploy.txt @@ -1,4 +1,4 @@ jupyterlab~=4.2.5 jupyterlite-core jupyterlite-pyodide-kernel -. +.. From f2c65da980aa3476d096e02254dced659a04e46b Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 8 Oct 2024 18:28:12 +0000 Subject: [PATCH 5/5] Revert "move demo files to demo" This reverts commit b9de33ba07ce8b1a5aba8f384426eb87d796bf9f. --- .gitignore | 1 - README.md | 3 +-- demo/deploy.sh => deploy.sh | 2 +- demo/requirements-deploy.txt => requirements-deploy.txt | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) rename demo/deploy.sh => deploy.sh (91%) rename demo/requirements-deploy.txt => requirements-deploy.txt (95%) diff --git a/.gitignore b/.gitignore index 0a5f6c4..461d437 100644 --- a/.gitignore +++ b/.gitignore @@ -128,4 +128,3 @@ dmypy.json _output/ cockle_wasm_env/ cockle-config.json -demo/dist \ No newline at end of file diff --git a/README.md b/README.md index ca09669..8c825f9 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,11 @@ jupyter lite build If you would like to deploy a JupyterLite site with the terminal extension, you will need to configure your server to add the `Cross-Origin-Embedder-Policy` and `Cross-Origin-Opener-Policy` headers. -As an example, this repository deploys the JupyterLite terminal to [Vercel](https://vercel.com), using the following files in the `demo` folder: +As an example, this repository deploys the JupyterLite terminal to [Vercel](https://vercel.com), using the following files: - `vercel.json`: configure the COOP / COEP server headers - `requirements-deploy.txt`: dependencies for the JupyterLite deployment - `deploy.sh`: script to deploy to Vercel, using micromamba to have full control on the Python versions and isolate the build in a virtual environment -- the `contents` directory contains a couple of demo files to try some commands such as `grep`, `echo` and `lua` For more information, have a look at the JupyterLite documentation: https://jupyterlite.readthedocs.io/ diff --git a/demo/deploy.sh b/deploy.sh similarity index 91% rename from demo/deploy.sh rename to deploy.sh index 48f7e1e..c57652f 100644 --- a/demo/deploy.sh +++ b/deploy.sh @@ -22,4 +22,4 @@ python -m pip install -r requirements-deploy.txt # build the JupyterLite site jupyter lite --version -jupyter lite build --contents contents --output-dir dist +jupyter lite build --contents demo/contents --output-dir dist diff --git a/demo/requirements-deploy.txt b/requirements-deploy.txt similarity index 95% rename from demo/requirements-deploy.txt rename to requirements-deploy.txt index 53b02a2..3748bdf 100644 --- a/demo/requirements-deploy.txt +++ b/requirements-deploy.txt @@ -1,4 +1,4 @@ jupyterlab~=4.2.5 jupyterlite-core jupyterlite-pyodide-kernel -.. +.