Skip to content

Commit d224e1f

Browse files
committed
Split blockly in two packages
1 parent 550c9d5 commit d224e1f

39 files changed

+3390
-269
lines changed

.eslintignore

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
**/node_modules
21
**/lib
2+
**/node_modules
3+
**/style
34
**/package.json
5+
**/tsconfig.json
46
**/patches
5-
dist
6-
coverage
77
**/*.d.ts
8-
tests
98

109
.github
1110
binder
12-
jupyterlab_blockly/labextension
11+
jupyterlab_blockly
1312
docs
1413
examples
14+
node_modules
1515
.eslintignore
1616
.eslintrc.js
1717
.gitignore
@@ -20,10 +20,14 @@ examples
2020
.prettierrc
2121
CHANGELOG.md
2222
install.json
23+
lerna.json
2324
LICENSE
2425
MANIFEST.in
26+
package.json
2527
pyproject.toml
2628
README.md
2729
RELEASE.md
30+
setup.py
31+
tsconfig.eslint.json
2832
tsconfig.json
2933
yarn.lock

.eslintrc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
2+
root: true,
23
extends: [
34
'eslint:recommended',
45
'plugin:@typescript-eslint/eslint-recommended',
@@ -8,7 +9,7 @@ module.exports = {
89
],
910
parser: '@typescript-eslint/parser',
1011
parserOptions: {
11-
project: 'tsconfig.json',
12+
project: 'tsconfig.eslint.json',
1213
sourceType: 'module'
1314
},
1415
plugins: ['@typescript-eslint'],
@@ -27,7 +28,9 @@ module.exports = {
2728
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
2829
'@typescript-eslint/no-explicit-any': 'off',
2930
'@typescript-eslint/no-namespace': 'off',
31+
'@typescript-eslint/no-var-requires': 'off',
3032
'@typescript-eslint/no-use-before-define': 'off',
33+
'@typescript-eslint/no-empty-interface': 'off',
3134
'@typescript-eslint/quotes': [
3235
'error',
3336
'single',
@@ -36,5 +39,10 @@ module.exports = {
3639
curly: ['error', 'all'],
3740
eqeqeq: 'error',
3841
'prefer-arrow-callback': 'error'
42+
},
43+
settings: {
44+
react: {
45+
version: 'detect'
46+
}
3947
}
4048
};

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
python -m pip install .
2828
2929
jupyter labextension list
30-
jupyter labextension list 2>&1 | grep -ie "jupyterlab-blockly.*OK"
30+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-blockly-extension.*OK"
3131
python -m jupyterlab.browser_check
3232
3333
check-manifest -v
@@ -66,5 +66,5 @@ jobs:
6666
sudo rm -rf $(which node)
6767
pip install myextension.tar.gz
6868
pip install jupyterlab
69-
jupyter labextension list 2>&1 | grep -ie "jupyterlab-blockly.*OK"
69+
jupyter labextension list 2>&1 | grep -ie "jupyterlab-blockly-extension.*OK"
7070
python -m jupyterlab.browser_check --no-browser-test

.prettierignore

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
1-
node_modules
2-
**/node_modules
31
**/lib
2+
**/node_modules
3+
**/style
44
**/package.json
5+
**/tsconfig.json
6+
**/patches
7+
**/*.d.ts
8+
9+
.github
10+
binder
511
jupyterlab_blockly
12+
docs
13+
examples
14+
node_modules
15+
.eslintignore
16+
.eslintrc.js
17+
.gitignore
18+
.pre-commit-config.yaml
19+
.prettierignore
20+
.prettierrc
21+
CHANGELOG.md
22+
install.json
23+
lerna.json
24+
LICENSE
25+
MANIFEST.in
26+
package.json
27+
pyproject.toml
28+
README.md
29+
RELEASE.md
30+
setup.py
31+
tsconfig.eslint.json
32+
tsconfig.json
33+
yarn.lock
34+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ micromamba create -n blockly -c conda-forge python nodejs pre-commit yarn jupyte
5454
micromamba activate blockly
5555
# Clone the repo to your local environment
5656
# Change directory to the jupyterlab_blockly directory
57-
# Install package in development mode
58-
pip install -e .
5957
# Installing pre-commit to run command when adding commits
6058
pre-commit install
59+
# Install package in development mode
60+
pip install -e .
6161
# Link your development version of the extension with JupyterLab
6262
jupyter labextension develop . --overwrite
6363
# Rebuild extension Typescript source after making changes

binder/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- python >=3.8,<3.9.0a0
1515
- jupyterlab >=3,<4.0.0a0
1616
# labextension build dependencies
17-
- nodejs >=14,<15
17+
- nodejs >=16,<17
1818
- pip
1919
- wheel
2020
# additional packages for demos

lerna.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"lerna": "5.1.0",
3+
"version": "independent",
4+
"npmClient": "yarn",
5+
"useWorkspaces": true
6+
}

package.json

Lines changed: 18 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "jupyterlab-blockly",
3+
"private": true,
34
"version": "0.1.0-alpha.2",
45
"description": "Blockly extension for JupyterLab.",
56
"keywords": [
@@ -16,93 +17,46 @@
1617
"name": "quantstack",
1718
"email": ""
1819
},
19-
"files": [
20-
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21-
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
22-
],
23-
"main": "lib/index.js",
24-
"types": "lib/index.d.ts",
25-
"style": "style/index.css",
2620
"repository": {
2721
"type": "git",
2822
"url": "https://github.com/quantstack/jupyterlab-blockly.git"
2923
},
24+
"workspaces": {
25+
"packages": [
26+
"packages/*"
27+
]
28+
},
3029
"scripts": {
31-
"build": "jlpm run build:lib && jlpm run build:labextension:dev",
32-
"build:prod": "jlpm run clean && jlpm run build:lib && jlpm run build:labextension",
33-
"build:labextension": "jupyter labextension build .",
34-
"build:labextension:dev": "jupyter labextension build --development True .",
35-
"build:lib": "tsc",
36-
"clean": "jlpm run clean:lib",
37-
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
38-
"clean:labextension": "rimraf jupyterlab_blockly/labextension",
39-
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
30+
"build": "lerna run build",
31+
"build:prod": "lerna run build:prod",
32+
"clean": "lerna run clean",
33+
"clean:all": "lerna run clean:all",
4034
"eslint": "jlpm eslint:check --fix",
4135
"eslint:check": "eslint . --ext .ts,.tsx",
42-
"install:extension": "jlpm run build",
36+
"install": "lerna bootstrap",
37+
"install:extension": "lerna run install:extension",
4338
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
4439
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
4540
"prettier": "jlpm prettier:base --write --list-different",
4641
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css}\"",
4742
"prettier:check": "jlpm prettier:base --check",
48-
"watch": "run-p watch:src watch:labextension",
49-
"watch:src": "tsc -w",
50-
"watch:labextension": "jupyter labextension watch .",
43+
"watch": "lerna run watch",
5144
"postinstall": "patch-package"
5245
},
5346
"dependencies": {
54-
"@jupyterlab/application": "^3.4",
55-
"@jupyterlab/apputils": "^3.4",
56-
"@jupyterlab/cells": "^3.4",
57-
"@jupyterlab/codeeditor": "^3.4",
58-
"@jupyterlab/coreutils": "^5.4",
59-
"@jupyterlab/docregistry": "^3.4",
60-
"@jupyterlab/filebrowser": "^3.4",
61-
"@jupyterlab/launcher": "^3.4",
62-
"@jupyterlab/outputarea": "^3.4",
63-
"@jupyterlab/rendermime": "^3.4",
64-
"@jupyterlab/services": "^6.4",
65-
"@jupyterlab/ui-components": "^3.4",
66-
"@lumino/algorithm": "^1.9.0",
67-
"@lumino/coreutils": "^1.11.0",
68-
"@lumino/messaging": "^1.10.0",
69-
"@lumino/signaling": "^1.10.0",
70-
"@lumino/widgets": "^1.30.0",
71-
"blockly": "^7.20211209.2",
72-
"patch-package": "^6.4.7",
73-
"postinstall-postinstall": "^2.1.0"
74-
},
75-
"devDependencies": {
76-
"@jupyterlab/builder": "^3.4",
7747
"@typescript-eslint/eslint-plugin": "^5.12.1",
7848
"@typescript-eslint/parser": "^5.12.1",
7949
"eslint": "^8.9.0",
8050
"eslint-config-prettier": "^8.4.0",
8151
"eslint-plugin-prettier": "^4.0.0",
8252
"eslint-plugin-react": "^7.30.0",
83-
"npm-run-all": "^4.1.5",
53+
"patch-package": "^6.4.7",
8454
"prettier": "^2.5.1",
85-
"rimraf": "^3.0.2",
55+
"postinstall-postinstall": "^2.1.0",
8656
"typescript": "~4.5.2"
8757
},
88-
"sideEffects": [
89-
"style/*.css",
90-
"style/index.js"
91-
],
92-
"styleModule": "style/index.js",
93-
"publishConfig": {
94-
"access": "public"
95-
},
96-
"jupyterlab": {
97-
"extension": true,
98-
"outputDir": "jupyterlab_blockly/labextension"
99-
},
100-
"jupyter-releaser": {
101-
"hooks": {
102-
"before-build-npm": [
103-
"python -m pip install jupyterlab",
104-
"jlpm"
105-
]
106-
}
58+
"devDependencies": {
59+
"lerna": "5.1.0",
60+
"yarn": "1.22.17"
10761
}
10862
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"name": "jupyterlab-blockly-extension",
3+
"version": "0.1.0-alpha.2",
4+
"description": "Blockly extension for JupyterLab.",
5+
"keywords": [
6+
"jupyter",
7+
"jupyterlab",
8+
"jupyterlab-extension"
9+
],
10+
"homepage": "https://github.com/quantstack/jupyterlab-blockly",
11+
"bugs": {
12+
"url": "https://github.com/quantstack/jupyterlab-blockly/issues"
13+
},
14+
"license": "BSD-3-Clause",
15+
"author": {
16+
"name": "quantstack",
17+
"email": ""
18+
},
19+
"files": [
20+
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21+
"style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}"
22+
],
23+
"main": "lib/index.js",
24+
"types": "lib/index.d.ts",
25+
"style": "style/index.css",
26+
"repository": {
27+
"type": "git",
28+
"url": "https://github.com/quantstack/jupyterlab-blockly.git"
29+
},
30+
"scripts": {
31+
"build": "jlpm run build:lib && jlpm run build:labextension:dev",
32+
"build:prod": "jlpm run clean && jlpm run build:lib && jlpm run build:labextension",
33+
"build:labextension": "jupyter labextension build .",
34+
"build:labextension:dev": "jupyter labextension build --development True .",
35+
"build:lib": "tsc",
36+
"clean": "jlpm run clean:lib",
37+
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
38+
"clean:labextension": "rimraf ../../jupyterlab_blockly/labextension",
39+
"clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
40+
"install:extension": "jlpm run build",
41+
"watch": "run-p watch:src watch:labextension",
42+
"watch:src": "tsc -w",
43+
"watch:labextension": "jupyter labextension watch ."
44+
},
45+
"dependencies": {
46+
"@jupyterlab/application": "^3.4",
47+
"@jupyterlab/apputils": "^3.4",
48+
"@jupyterlab/codeeditor": "^3.4",
49+
"@jupyterlab/filebrowser": "^3.4",
50+
"@jupyterlab/launcher": "^3.4",
51+
"@jupyterlab/settingregistry": "^3.4",
52+
"@jupyterlab/rendermime": "^3.4",
53+
"@jupyterlab/translation": "^3.4",
54+
"@jupyterlab/ui-components": "^3.4",
55+
"jupyterlab-blockly": "^0.1.0-alpha.2"
56+
},
57+
"devDependencies": {
58+
"@jupyterlab/builder": "^3.4",
59+
"npm-run-all": "^4.1.5",
60+
"rimraf": "^3.0.2",
61+
"typescript": "~4.5.2"
62+
},
63+
"sideEffects": [
64+
"style/*.css",
65+
"style/index.js"
66+
],
67+
"styleModule": "style/index.js",
68+
"publishConfig": {
69+
"access": "public"
70+
},
71+
"jupyterlab": {
72+
"extension": true,
73+
"outputDir": "../../jupyterlab_blockly/labextension"
74+
},
75+
"jupyter-releaser": {
76+
"hooks": {
77+
"before-build-npm": [
78+
"python -m pip install jupyterlab",
79+
"jlpm"
80+
]
81+
}
82+
}
83+
}
File renamed without changes.

0 commit comments

Comments
 (0)