Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #117 from jtpio/watch-mode
Browse files Browse the repository at this point in the history
Add watch mode
  • Loading branch information
jtpio authored Apr 20, 2021
2 parents 15f2ef0 + e941a2a commit 278233d
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 3 deletions.
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ pip install -e .
`jupyterlab-classic` follows a monorepo structure. To build all the packages at once:

```bash
jlpm run build
jlpm build
```

There is also a `watch` script to watch for changes and rebuild the app automatically:

```bash
jlpm watch
```

To make sure the `jupyterlab_classic` server extension is installed:
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
"test:e2e": "jlpm run clean:artifacts && jest",
"test:e2e:pwdebug": "jlpm run clean:artifacts && PWDEBUG=1 jlpm run test:e2e",
"watch": "webpack --watch"
"watch": "webpack --config ./webpack.config.watch.js"
},
"resolutions": {
"@jupyterlab-classic/application": "~0.1.10",
Expand Down
17 changes: 17 additions & 0 deletions app/webpack.config.watch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const base = require('./webpack.config');
const ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');

module.exports = [
{
...base[0],
bail: false,
watch: true,
plugins: [
...base[0].plugins,
new ExtraWatchWebpackPlugin({
files: ['../packages/_metapackage/tsconfig.tsbuildinfo']
})
]
},
...base.slice(1)
];
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"test": "lerna run test",
"test:e2e": "lerna run test:e2e --stream",
"test:ci": "(jlpm run start&) && jlpm run test:e2e",
"update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js --lerna"
"update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js --lerna",
"watch": "run-p watch:lib watch:app",
"watch:lib": "lerna exec --stream --scope @jupyterlab-classic/metapackage jlpm watch",
"watch:app": "lerna exec --stream --scope \"@jupyterlab-classic/app\" jlpm watch"
},
"husky": {
"hooks": {
Expand All @@ -52,6 +55,7 @@
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"extra-watch-webpack-plugin": "^1.0.3",
"husky": "^3",
"jest": "^26.4.2",
"jest-junit": "^11.1.0",
Expand Down
36 changes: 36 additions & 0 deletions packages/_metapackage/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@jupyterlab-classic/metapackage",
"private": true,
"version": "0.1.0",
"description": "JupyterLab Classic - Metapackage",
"homepage": "https://github.com/jtpio/jupyterlab-classic",
"bugs": {
"url": "https://github.com/jtpio/jupyterlab-classic/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jtpio/jupyterlab-classic.git"
},
"license": "BSD-3-Clause",
"author": "JupyterLab Classic Contributors",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "tsc -b",
"watch": "tsc -b -w --preserveWatchOutput"
},
"dependencies": {
"@jupyterlab-classic/application": "file:../application",
"@jupyterlab-classic/application-extension": "file:../application-extension",
"@jupyterlab-classic/docmanager-extension": "file:../docmanager-extension",
"@jupyterlab-classic/help-extension": "file:../help-extension",
"@jupyterlab-classic/lab-extension": "file:../lab-extension",
"@jupyterlab-classic/notebook-extension": "file:../notebook-extension",
"@jupyterlab-classic/terminal-extension": "file:../terminal-extension",
"@jupyterlab-classic/tree-extension": "file:../tree-extension",
"@jupyterlab-classic/ui-components": "file:../ui-components"
},
"devDependencies": {
"typescript": "~4.1.3"
}
}
9 changes: 9 additions & 0 deletions packages/_metapackage/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import '@jupyterlab-classic/application';
import '@jupyterlab-classic/application-extension';
import '@jupyterlab-classic/docmanager-extension';
import '@jupyterlab-classic/help-extension';
import '@jupyterlab-classic/lab-extension';
import '@jupyterlab-classic/notebook-extension';
import '@jupyterlab-classic/terminal-extension';
import '@jupyterlab-classic/tree-extension';
import '@jupyterlab-classic/ui-components';
19 changes: 19 additions & 0 deletions packages/_metapackage/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfigbase",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"include": ["src/**/*"],
"references": [
{ "path": "../application" },
{ "path": "../application-extension" },
{ "path": "../docmanager-extension" },
{ "path": "../help-extension" },
{ "path": "../lab-extension" },
{ "path": "../notebook-extension" },
{ "path": "../terminal-extension" },
{ "path": "../tree-extension" },
{ "path": "../ui-components" }
]
}
127 changes: 127 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,115 @@
"@types/yargs" "^15.0.0"
chalk "^4.0.0"

"@jupyterlab-classic/application-extension@file:packages/application-extension":
version "0.1.10"
dependencies:
"@jupyterlab-classic/application" "^0.1.10"
"@jupyterlab-classic/ui-components" "^0.1.10"
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/apputils" "^3.0.0"
"@jupyterlab/celltags" "^3.0.0"
"@jupyterlab/codeeditor" "^3.0.0"
"@jupyterlab/codemirror" "^3.0.0"
"@jupyterlab/coreutils" "^5.0.0"
"@jupyterlab/docmanager" "^3.0.0"
"@jupyterlab/docregistry" "^3.0.0"
"@jupyterlab/mainmenu" "^3.0.0"
"@jupyterlab/settingregistry" "^3.0.0"
"@jupyterlab/translation" "^3.0.0"
"@lumino/widgets" "^1.14.0"

"@jupyterlab-classic/application@file:packages/application":
version "0.1.10"
dependencies:
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/coreutils" "^5.0.0"
"@jupyterlab/docregistry" "^3.0.0"
"@jupyterlab/rendermime-interfaces" "^3.0.0"
"@jupyterlab/ui-components" "^3.0.0"
"@lumino/algorithm" "^1.3.3"
"@lumino/coreutils" "^1.5.3"
"@lumino/messaging" "^1.4.3"
"@lumino/polling" "^1.3.3"
"@lumino/signaling" "^1.4.3"
"@lumino/widgets" "^1.14.0"

"@jupyterlab-classic/docmanager-extension@file:packages/docmanager-extension":
version "0.1.10"
dependencies:
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/coreutils" "^5.0.0"
"@jupyterlab/docmanager" "^3.0.0"
"@jupyterlab/docregistry" "^3.0.0"
"@jupyterlab/services" "^6.0.0"
"@lumino/algorithm" "^1.3.3"

"@jupyterlab-classic/help-extension@file:packages/help-extension":
version "0.1.10"
dependencies:
"@jupyterlab-classic/ui-components" "^0.1.10"
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/apputils" "^3.0.0"
"@jupyterlab/mainmenu" "^3.0.0"

"@jupyterlab-classic/lab-extension@file:packages/lab-extension":
version "0.1.10"
dependencies:
"@jupyterlab-classic/ui-components" "^0.1.10"
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/apputils" "^3.0.0"
"@jupyterlab/coreutils" "^5.0.0"
"@jupyterlab/docregistry" "^3.0.0"
"@jupyterlab/mainmenu" "^3.0.0"
"@jupyterlab/notebook" "^3.0.0"
"@lumino/commands" "^1.11.4"
"@lumino/disposable" "^1.4.3"

"@jupyterlab-classic/notebook-extension@file:packages/notebook-extension":
version "0.1.10"
dependencies:
"@jupyterlab-classic/application" "^0.1.10"
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/apputils" "^3.0.0"
"@jupyterlab/docmanager" "^3.0.0"
"@jupyterlab/notebook" "^3.0.0"
"@lumino/polling" "^1.3.3"
"@lumino/widgets" "^1.14.0"

"@jupyterlab-classic/terminal-extension@file:packages/terminal-extension":
version "0.1.10"
dependencies:
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/coreutils" "^5.0.0"
"@jupyterlab/terminal" "^3.0.0"
"@lumino/algorithm" "^1.3.3"

"@jupyterlab-classic/tree-extension@file:packages/tree-extension":
version "0.1.10"
dependencies:
"@jupyterlab-classic/application" "^0.1.10"
"@jupyterlab/application" "^3.0.0"
"@jupyterlab/apputils" "^3.0.0"
"@jupyterlab/coreutils" "^5.0.0"
"@jupyterlab/docmanager" "^3.0.0"
"@jupyterlab/filebrowser" "^3.0.0"
"@jupyterlab/mainmenu" "^3.0.0"
"@jupyterlab/services" "^6.0.0"
"@jupyterlab/settingregistry" "^3.0.0"
"@jupyterlab/statedb" "^3.0.0"
"@jupyterlab/translation" "^3.0.0"
"@jupyterlab/ui-components" "^3.0.0"
"@lumino/algorithm" "^1.3.3"
"@lumino/commands" "^1.12.0"
"@lumino/widgets" "^1.16.1"

"@jupyterlab-classic/ui-components@file:packages/ui-components":
version "0.1.10"
dependencies:
"@jupyterlab/ui-components" "^3.0.0"
react "^17.0.1"
react-dom "^17.0.1"

"@jupyterlab/application@^3.0.0", "@jupyterlab/application@^3.0.7":
version "3.0.7"
resolved "https://registry.yarnpkg.com/@jupyterlab/application/-/application-3.0.7.tgz#de5f237cf06b6a69ddbe308e1449726ae05936a0"
Expand Down Expand Up @@ -6111,6 +6220,16 @@ extglob@^2.0.4:
snapdragon "^0.8.1"
to-regex "^3.0.1"

extra-watch-webpack-plugin@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/extra-watch-webpack-plugin/-/extra-watch-webpack-plugin-1.0.3.tgz#774248f4ac590159bd5878d862d77afce697d7cc"
integrity sha512-ZScQdMH6hNofRRN6QMQFg+aa5vqimfBgnPXmRDhdaLpttT6hrzpY9Oyren3Gh/FySPrgsvKCNbx/NFA7XNdIsg==
dependencies:
glob "^7.1.2"
is-glob "^4.0.0"
lodash.uniq "^4.5.0"
schema-utils "^0.4.0"

extract-zip@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
Expand Down Expand Up @@ -10711,6 +10830,14 @@ scheduler@^0.20.2:
loose-envify "^1.1.0"
object-assign "^4.1.1"

schema-utils@^0.4.0:
version "0.4.7"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187"
integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==
dependencies:
ajv "^6.1.0"
ajv-keywords "^3.1.0"

schema-utils@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
Expand Down

0 comments on commit 278233d

Please sign in to comment.