Skip to content

Commit 4e1edfd

Browse files
authored
Merge pull request #1 from blink1073/consolidate
Consolidate to single npm package and update for new plugin API
2 parents e613659 + 4274d82 commit 4e1edfd

File tree

25 files changed

+173
-238
lines changed

25 files changed

+173
-238
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,15 @@ before_script:
2323
script:
2424
- py.test
2525
- npm test
26+
# Make a non-local install so the data_files get populated
27+
- pip uninstall -y ipywidgettestwidgets
28+
- pip install .
29+
- jupyter nbextension enable --py --sys-prefix ipywidgettestwidgets
30+
- pip install jupyterlab
31+
# Make sure our lab extension was installed.
32+
- jupyter labextension list
33+
- jupyter labextension list 2>&1 | grep -q jupyter-widget-testwidgets
34+
# Make sure our lab extension can be linked.
35+
- jupyter labextension link
2636
- popd
2737
- popd

{{cookiecutter.github_project_name}}/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include pytest.ini
66
include .coverage.rc
77

88
include package.json
9-
include lerna.json
9+
include {{ cookiecutter.python_package_name }}/labextension/*.tgz
1010

1111
# Documentation
1212
graft docs

{{cookiecutter.github_project_name}}/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@
99

1010
## Installation
1111

12-
A typical installation requires the following three commands to be run:
12+
A typical installation requires the following commands to be run:
1313

1414
```bash
1515
pip install {{ cookiecutter.python_package_name }}
16-
jupyter nbextension install --py [--sys-prefix|--user|--system] {{ cookiecutter.python_package_name }}
1716
jupyter nbextension enable --py [--sys-prefix|--user|--system] {{ cookiecutter.python_package_name }}
1817
```
1918

2019
Or, if you use jupyterlab:
2120

2221
```bash
2322
pip install {{ cookiecutter.python_package_name }}
24-
jupyter labextension install {{ cookiecutter.jlab_extension_name }}
23+
jupyter labextension install @jupyter-widgets/jupyterlab-manager
2524
```

{{cookiecutter.github_project_name}}/lerna.json

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,74 @@
11
{
2-
"private": true,
2+
"name": "{{ cookiecutter.npm_package_name }}",
3+
"version": "{{ cookiecutter.npm_package_version }}",
4+
"description": "{{ cookiecutter.project_short_description }}",
5+
"keywords": [
6+
"jupyter",
7+
"jupyterlab",
8+
"jupyterlab extension",
9+
"widgets"
10+
],
11+
"homepage": "https://github.com/jupyter/{{ cookiecutter.npm_package_name }}",
12+
"bugs": {
13+
"url": "https://github.com/jupyter/{{ cookiecutter.npm_package_name }}/issues"
14+
},
15+
"license": "BSD-3-Clause",
16+
"author": "",
17+
"main": "lib/index.js",
18+
"types": "./lib/index.d.ts",
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/jupyter/{{ cookiecutter.npm_package_name }}"
22+
},
323
"scripts": {
4-
"install": "lerna bootstrap --hoist",
5-
"clean": "lerna run clean",
6-
"build": "lerna run build",
7-
"updated": "lerna updated",
8-
"test": "lerna run test",
9-
"publish": "npm run clean && npm run build && lerna publish -m \"Publish npm packages\""
24+
"build": "npm run build:lib && npm run build:nbextension",
25+
"build:labextension": "cd {{ cookiecutter.python_package_name }} && rimraf labextension && mkdirp labextension && cd labextension && npm pack ../..",
26+
"build:lib": "tsc --project src",
27+
"build:nbextension": "webpack",
28+
"build:all": "npm run build:lib && npm run build:labextension && npm run build:nbextension",
29+
"clean": "npm run clean:lib && npm run clean:nbextension",
30+
"clean:lib": "rimraf lib",
31+
"clean:labextension": "rimraf {{ cookiecutter.python_package_name }}/labextension",
32+
"clean:nbextension": "rimraf {{ cookiecutter.python_package_name }}/nbextension/static/index.js",
33+
"prepare": "npm run build:lib",
34+
"test": "npm run test:firefox",
35+
"test:chrome": "karma start --browsers=Chrome tests/karma.conf.js",
36+
"test:debug": "karma start --browsers=Chrome --singleRun=false --debug=true tests/karma.conf.js",
37+
"test:firefox": "karma start --browsers=Firefox tests/karma.conf.js",
38+
"test:ie": "karma start --browsers=IE tests/karma.conf.js",
39+
"watch": "npm-run-all -p watch:*",
40+
"watch:lib": "tsc -w --project src",
41+
"watch:nbextension": "webpack --watch"
42+
},
43+
"dependencies": {
44+
"@jupyter-widgets/base": "^1.0.1"
1045
},
1146
"devDependencies": {
12-
"lerna": "^2.0.0"
47+
"@phosphor/application": "^1.5.0",
48+
"@phosphor/widgets": "^1.5.0",
49+
"@types/expect.js": "^0.3.29",
50+
"@types/mocha": "^2.2.41",
51+
"@types/node": "^8.0.17",
52+
"expect.js": "^0.3.1",
53+
"fs-extra": "^4.0.2",
54+
"json-loader": "^0.5.7",
55+
"karma": "^1.7.0",
56+
"karma-chrome-launcher": "^2.2.0",
57+
"karma-firefox-launcher": "^1.0.1",
58+
"karma-ie-launcher": "^1.0.0",
59+
"karma-mocha": "^1.3.0",
60+
"karma-mocha-reporter": "^2.2.3",
61+
"karma-typescript": "^3.0.5",
62+
"mkdirp": "^0.5.1",
63+
"mocha": "^3.5.0",
64+
"npm-run-all": "^4.1.1",
65+
"rimraf": "^2.6.2",
66+
"source-map-loader": "^0.2.1",
67+
"ts-loader": "^2.3.2",
68+
"typescript": "~2.4.2",
69+
"webpack": "^3.4.1"
70+
},
71+
"jupyterlab": {
72+
"extension": "lib/plugin"
1373
}
1474
}

{{cookiecutter.github_project_name}}/packages/{{ cookiecutter.jlab_extension_name }}/package.json

Lines changed: 0 additions & 44 deletions
This file was deleted.

{{cookiecutter.github_project_name}}/packages/{{ cookiecutter.jlab_extension_name }}/src/index.ts

Lines changed: 0 additions & 59 deletions
This file was deleted.

{{cookiecutter.github_project_name}}/packages/{{ cookiecutter.jlab_extension_name }}/src/tsconfig.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)