Skip to content

Commit 2cc2cde

Browse files
jasongroutianhi
authored andcommitted
Polish lab extension paths and build process
1 parent 6d5505c commit 2cc2cde

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

{{cookiecutter.github_project_name}}/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@
2929
"url": "https://github.com/{{ cookiecutter.github_organization_name }}/{{ cookiecutter.github_project_name }}"
3030
},
3131
"scripts": {
32-
"build": "npm run build:lib && npm run build:nbextension",
32+
"build": "npm run build:lib && npm run build:nbextension && npm run build:labextension",
3333
"build:labextension": "jupyter labextension build .",
3434
"build:labextension:dev": "jupyter labextension build --development True .",
3535
"build:lib": "tsc",
3636
"build:nbextension": "webpack -p",
37-
"build:all": "npm run build:labextension && npm run build:nbextension",
38-
"clean": "npm run clean:lib && npm run clean:nbextension",
37+
"clean": "npm run clean:lib && npm run clean:nbextension && npm run clean:labextension",
3938
"clean:lib": "rimraf lib",
40-
"clean:labextension": "rimraf {{ cookiecutter.python_package_name }}/jupyterlab_widgets/lab3extension",
39+
"clean:labextension": "rimraf {{ cookiecutter.python_package_name }}/labextension",
4140
"clean:nbextension": "rimraf {{ cookiecutter.python_package_name }}/nbextension/static/index.js",
4241
"lint": "eslint . --ext .ts,.tsx --fix",
4342
"lint:check": "eslint . --ext .ts,.tsx",
@@ -93,7 +92,7 @@
9392
},
9493
"jupyterlab": {
9594
"extension": "lib/plugin",
96-
"outputDir": "jupyterlab_widgets/static",
95+
"outputDir": "{{ cookiecutter.python_package_name }}/labextension/",
9796
"sharedPackages": {
9897
"@jupyter-widgets/base": {
9998
"bundled": false,

{{cookiecutter.github_project_name}}/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
nb_path = pjoin(HERE, name, 'nbextension', 'static')
3131
# lab_path = pjoin(HERE, name, 'labextension')
32-
lab3_path = pjoin(HERE, name, 'lab3extension')
32+
lab3_path = pjoin(HERE, name, 'labextension')
3333

3434
# Representative files that should exist after a successful build
3535
jstargets = [
@@ -41,7 +41,7 @@
4141
name: [
4242
'nbextension/static/*.*js*',
4343
# 'labextension/*.tgz',
44-
'lab3extension/*'
44+
'labextension/*'
4545
]
4646
}
4747

@@ -59,7 +59,7 @@
5959
cmdclass = create_cmdclass('jsdeps', package_data_spec=package_data_spec,
6060
data_files_spec=data_files_spec)
6161
cmdclass['jsdeps'] = combine_commands(
62-
install_npm(HERE, build_cmd='build:all'),
62+
install_npm(HERE, build_cmd='build'),
6363
ensure_targets(jstargets),
6464
)
6565

0 commit comments

Comments
 (0)