Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit d646171

Browse files
authored
Merge pull request #18 from jtpio/lerna
Switch to using lerna
2 parents e7089ea + 317a604 commit d646171

File tree

14 files changed

+39
-23
lines changed

14 files changed

+39
-23
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
run: python -m pip install jupyterlab nbresuse
2323
- name: Build and install the extension
2424
run: |
25-
jlpm && jlpm run build
26-
jupyter labextension link ./system-monitor-base --no-build
27-
jupyter labextension install jupyterlab-topbar-extension ./system-monitor
25+
jlpm
26+
jlpm run build
27+
jlpm run install
2828
- name: Browser check
2929
run: python -m jupyterlab.browser_check

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,15 @@ You can change the label and refresh rate in JupyterLab's advanced settings edit
6969

7070
```bash
7171
# create a new conda environment
72-
conda create -n jupyterlab-system-monitor jupyterlab nodejs
72+
conda create -n jupyterlab-system-monitor jupyterlab nodejs nbresuse
7373
conda activate jupyterlab-system-monitor
7474

75-
# package to retrieve the system metrics
76-
python -m pip install nbresuse
75+
# Install dependencies
76+
jlpm
7777

78-
# required to place indicators in the top area
79-
jupyter labextension install jupyterlab-topbar-extension
78+
# Build Typescript source
79+
jlpm run build
8080

81-
# local install of the extension
82-
jupyter labextension link system-monitor-base
83-
jupyter labextension install system-monitor
81+
# Link and install the extensions
82+
jlpm run install
8483
```

lerna.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"packages": [
3+
"packages/*"
4+
],
5+
"npmClient": "jlpm",
6+
"useWorkspaces": true,
7+
"version": "independent"
8+
}

package.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
{
22
"private": true,
3-
"workspaces": [
4-
"system-monitor",
5-
"system-monitor-base"
6-
],
73
"scripts": {
8-
"build": "tsc --build system-monitor-base system-monitor"
4+
"bootstrap": "lerna bootstrap",
5+
"build": "lerna run build",
6+
"clean": "lerna run clean",
7+
"link": "lerna run link",
8+
"install": "lerna run link && jupyter labextension install jupyterlab-topbar-extension"
9+
},
10+
"workspaces": {
11+
"packages": [
12+
"packages/*"
13+
]
14+
},
15+
"devDependencies": {
16+
"lerna": "^3.20.2"
917
}
1018
}
11-

system-monitor-base/package.json renamed to packages/system-monitor-base/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"scripts": {
2828
"build": "tsc",
29+
"link": "jupyter labextension link . --no-build",
2930
"prettier": "prettier --write '**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}'",
3031
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
3132
"prepare": "npm run clean && npm run build",
@@ -34,13 +35,13 @@
3435
"dependencies": {
3536
"@jupyterlab/apputils": "^2.0.0",
3637
"@jupyterlab/statusbar": "^2.0.0",
37-
"react": "^16.9.0",
38-
"react-dom": "^16.9.0",
38+
"react": "~16.9.0",
39+
"react-dom": "~16.9.0",
3940
"react-sparklines": "^1.7.0"
4041
},
4142
"devDependencies": {
42-
"@types/react": "^16.9.0",
43-
"@types/react-dom": "^16.9.0",
43+
"@types/react": "~16.9.0",
44+
"@types/react-dom": "~16.9.0",
4445
"@types/react-sparklines": "^1.7.0",
4546
"husky": "^3.0.0",
4647
"lint-staged": "^8.1.5",

system-monitor-base/tsconfig.json renamed to packages/system-monitor-base/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfigbase",
2+
"extends": "../../tsconfigbase",
33
"compilerOptions": {
44
"outDir": "lib",
55
"rootDir": "src",

system-monitor/package.json renamed to packages/system-monitor/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"scripts": {
2828
"build": "tsc",
29+
"link": "jupyter labextension link . --no-build",
2930
"prettier": "prettier --write '**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}'",
3031
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
3132
"prepare": "npm run clean && npm run build",
File renamed without changes.

system-monitor/tsconfig.json renamed to packages/system-monitor/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfigbase",
2+
"extends": "../../tsconfigbase",
33
"compilerOptions": {
44
"outDir": "lib",
55
"rootDir": "src",

0 commit comments

Comments
 (0)