mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
jsx: build directly in destination
removes `npm run place`, allows build:watch
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -38,3 +38,5 @@ docs/source/reference/metrics.rst
|
||||
oldest-requirements.txt
|
||||
jupyterhub-proxy.pid
|
||||
examples/server-api/service-token
|
||||
|
||||
*.hot-update*
|
||||
|
@@ -7,8 +7,8 @@
|
||||
"license": "BSD-3-Clause",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"build:watch": "webpack watch",
|
||||
"hot": "webpack && webpack-dev-server",
|
||||
"place": "cp build/admin-react.js* ../share/jupyterhub/static/js/",
|
||||
"test": "jest --verbose",
|
||||
"snap": "jest --updateSnapshot",
|
||||
"lint": "eslint --ext .jsx --ext .js src/",
|
||||
|
@@ -28,7 +28,7 @@ module.exports = {
|
||||
output: {
|
||||
publicPath: "/",
|
||||
filename: "admin-react.js",
|
||||
path: path.resolve(__dirname, "build"),
|
||||
path: path.resolve(__dirname, "../share/jupyterhub/static/js/"),
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".css", ".js", ".jsx"],
|
||||
|
7
setup.py
7
setup.py
@@ -215,13 +215,6 @@ class JSX(BaseCommand):
|
||||
shell=shell,
|
||||
)
|
||||
|
||||
print("Copying JSX admin app to static/js")
|
||||
check_call(
|
||||
["npm", "run", "place"],
|
||||
cwd=self.jsx_dir,
|
||||
shell=shell,
|
||||
)
|
||||
|
||||
# update data-files in case this created new files
|
||||
self.distribution.data_files = get_data_files()
|
||||
assert not self.should_run(), 'JSX.run failed'
|
||||
|
Reference in New Issue
Block a user