mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
run lessc via npm
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
"url": "https://github.com/jupyter/jupyterhub.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "./bower-lite"
|
||||
"postinstall": "./bower-lite",
|
||||
"lessc": "lessc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"less": "^2.7.1",
|
||||
|
6
setup.py
6
setup.py
@@ -219,17 +219,15 @@ class CSS(BaseCommand):
|
||||
style_css = pjoin(static, 'css', 'style.min.css')
|
||||
sourcemap = style_css + '.map'
|
||||
|
||||
env = os.environ.copy()
|
||||
env['PATH'] = npm_path
|
||||
args = [
|
||||
'lessc', '--clean-css',
|
||||
'npm', 'run', 'lessc', '--', '--clean-css',
|
||||
'--source-map-basepath={}'.format(static),
|
||||
'--source-map={}'.format(sourcemap),
|
||||
'--source-map-rootpath=../',
|
||||
style_less, style_css,
|
||||
]
|
||||
try:
|
||||
check_call(args, cwd=here, env=env, shell=shell)
|
||||
check_call(args, cwd=here, shell=shell)
|
||||
except OSError as e:
|
||||
print("Failed to run lessc: %s" % e, file=sys.stderr)
|
||||
print("You can install js dependencies with `npm install`", file=sys.stderr)
|
||||
|
Reference in New Issue
Block a user