Skip to content

Commit 3a641c2

Browse files
authored
Merge pull request #33 from hbcarlos/split-packages
Split blockly in two packages
2 parents 550c9d5 + ad38308 commit 3a641c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3453
-294
lines changed

.eslintignore

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

108
.github
119
binder
12-
jupyterlab_blockly/labextension
10+
jupyterlab_blockly
1311
docs
1412
examples
13+
node_modules
14+
patches
15+
scripts
1516
.eslintignore
1617
.eslintrc.js
1718
.gitignore
@@ -20,10 +21,14 @@ examples
2021
.prettierrc
2122
CHANGELOG.md
2223
install.json
24+
lerna.json
2325
LICENSE
2426
MANIFEST.in
27+
package.json
2528
pyproject.toml
2629
README.md
2730
RELEASE.md
31+
setup.py
32+
tsconfig.eslint.json
2833
tsconfig.json
2934
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: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
1-
node_modules
2-
**/node_modules
31
**/lib
2+
**/node_modules
3+
**/style
44
**/package.json
5+
**/tsconfig.json
6+
**/patches
7+
**/scripts
8+
**/*.d.ts
9+
10+
.github
11+
binder
512
jupyterlab_blockly
13+
docs
14+
examples
15+
node_modules
16+
patches
17+
scripts
18+
.eslintignore
19+
.eslintrc.js
20+
.gitignore
21+
.pre-commit-config.yaml
22+
.prettierignore
23+
.prettierrc
24+
CHANGELOG.md
25+
install.json
26+
lerna.json
27+
LICENSE
28+
MANIFEST.in
29+
package.json
30+
pyproject.toml
31+
README.md
32+
RELEASE.md
33+
setup.py
34+
tsconfig.eslint.json
35+
tsconfig.json
36+
yarn.lock
37+

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ graft jupyterlab_blockly/labextension
1111
recursive-include patches *.patch
1212

1313
# Javascript files
14-
graft src
15-
graft style
14+
graft packages/blockly-extension
1615
prune **/node_modules
1716
prune lib
1817
prune binder
18+
prune scripts
1919

2020
# Patterns to exclude from any directory
2121
global-exclude *~

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

jupyterlab_blockly/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def _fetchVersion():
77
HERE = Path(__file__).parent.resolve()
88

9-
for settings in HERE.rglob("package.json"):
9+
for settings in HERE.rglob("packages/blockly-extension/package.json"):
1010
try:
1111
with settings.open() as f:
1212
version = json.load(f)["version"]

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: 19 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,43 @@
11
{
2-
"name": "jupyterlab-blockly",
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"
2+
"name": "jupyterlab-blockly-root",
3+
"version": "0.1.0",
4+
"private": true,
5+
"workspaces": {
6+
"packages": [
7+
"packages/*"
8+
]
299
},
3010
"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",
11+
"build": "lerna run build",
12+
"build:prod": "lerna run build:prod",
13+
"clean": "lerna run clean",
14+
"clean:all": "lerna run clean:all",
4015
"eslint": "jlpm eslint:check --fix",
4116
"eslint:check": "eslint . --ext .ts,.tsx",
42-
"install:extension": "jlpm run build",
17+
"install": "lerna bootstrap",
18+
"install:extension": "lerna run install:extension",
4319
"lint": "jlpm stylelint && jlpm prettier && jlpm eslint",
4420
"lint:check": "jlpm stylelint:check && jlpm prettier:check && jlpm eslint:check",
4521
"prettier": "jlpm prettier:base --write --list-different",
4622
"prettier:base": "prettier \"**/*{.ts,.tsx,.js,.jsx,.css}\"",
4723
"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 .",
24+
"watch": "lerna run watch",
5125
"postinstall": "patch-package"
5226
},
5327
"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",
7728
"@typescript-eslint/eslint-plugin": "^5.12.1",
7829
"@typescript-eslint/parser": "^5.12.1",
7930
"eslint": "^8.9.0",
8031
"eslint-config-prettier": "^8.4.0",
8132
"eslint-plugin-prettier": "^4.0.0",
8233
"eslint-plugin-react": "^7.30.0",
83-
"npm-run-all": "^4.1.5",
34+
"patch-package": "^6.4.7",
8435
"prettier": "^2.5.1",
85-
"rimraf": "^3.0.2",
36+
"postinstall-postinstall": "^2.1.0",
8637
"typescript": "~4.5.2"
8738
},
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-
}
39+
"devDependencies": {
40+
"lerna": "5.1.0",
41+
"yarn": "1.22.17"
10742
}
10843
}

0 commit comments

Comments
 (0)