update-prod-static: Add code to copy CSS from node_modules

This commit is contained in:
Rafid Aslam
2017-03-11 14:09:30 +07:00
committed by Tim Abbott
parent bf2cfa8073
commit ef2c0f806e

View File

@@ -70,6 +70,12 @@ subprocess.check_call(['cp', '-R', 'node_modules/katex/dist/fonts',
'node_modules/katex/dist/fonts')],
stdout=fp, stderr=fp)
CSS_FILES = ['node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.css']
# Copy CSS files in node_modules to prod-static/serve
for css_file in CSS_FILES:
subprocess.check_call(['cp', '--parents', css_file, settings.STATIC_ROOT])
# Collect the files that we're going to serve; this creates prod-static/serve.
subprocess.check_call(['./manage.py', 'collectstatic', '--no-default-ignore',
'--noinput', '-i', 'assets', '-i' 'node_modules'],