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