mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
jsx: trade yarn for npm
we're already using npm at the top-level, using both yarn and npm complicates things - stop excluding package-lock.json from the repo
This commit is contained in:
16
setup.py
16
setup.py
@@ -198,32 +198,26 @@ class JSX(BaseCommand):
|
||||
print("JSX admin app is up to date")
|
||||
return
|
||||
|
||||
# jlpm is a version of yarn bundled with JupyterLab
|
||||
if shutil.which('yarn'):
|
||||
yarn = 'yarn'
|
||||
elif shutil.which('jlpm'):
|
||||
print("yarn not found, using jlpm")
|
||||
yarn = 'jlpm'
|
||||
else:
|
||||
raise Exception('JSX needs to be updated but yarn is not installed')
|
||||
if not shutil.which('npm'):
|
||||
raise Exception('JSX needs to be updated but npm is not installed')
|
||||
|
||||
print("Installing JSX admin app requirements")
|
||||
check_call(
|
||||
[yarn],
|
||||
['npm', 'install', '--progress=false', '--unsafe-perm'],
|
||||
cwd=self.jsx_dir,
|
||||
shell=shell,
|
||||
)
|
||||
|
||||
print("Building JSX admin app")
|
||||
check_call(
|
||||
[yarn, 'build'],
|
||||
["npm", "run", "build"],
|
||||
cwd=self.jsx_dir,
|
||||
shell=shell,
|
||||
)
|
||||
|
||||
print("Copying JSX admin app to static/js")
|
||||
check_call(
|
||||
[yarn, 'place'],
|
||||
["npm", "run", "place"],
|
||||
cwd=self.jsx_dir,
|
||||
shell=shell,
|
||||
)
|
||||
|
Reference in New Issue
Block a user