jsx: build directly in destination

removes `npm run place`, allows build:watch
This commit is contained in:
Min RK
2024-03-06 00:27:18 +01:00
parent fd78a03280
commit 87bf84d05f
4 changed files with 4 additions and 9 deletions

2
.gitignore vendored
View File

@@ -38,3 +38,5 @@ docs/source/reference/metrics.rst
oldest-requirements.txt
jupyterhub-proxy.pid
examples/server-api/service-token
*.hot-update*

View File

@@ -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/",

View File

@@ -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"],

View File

@@ -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'