mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 14:03:30 +00:00 
			
		
		
		
	update-prod-static: Don't copy/minify templates and styles.
This is a performance optimization: Rather than copying these files into the `prod-static` directory and then deleting them, we just don't copy them over in the first place. For styles, it might have once been the case that this did something, but we've moved them all to being managed by webpack some time ago. For the js directory, I think it was never useful to copy and then delete them; these files were always compiled via tools/minify-js, and the raw JS files weren't needed, anyway.
This commit is contained in:
		@@ -79,7 +79,7 @@ for css_file in CSS_FILES:
 | 
			
		||||
 | 
			
		||||
# Collect the files that we're going to serve; this creates prod-static/serve.
 | 
			
		||||
run(['./manage.py', 'collectstatic', '--no-default-ignore',
 | 
			
		||||
     '--noinput', '-i', 'assets', '-i' 'node_modules'],
 | 
			
		||||
     '--noinput', '-i', 'assets', '-i' 'node_modules', '-i', 'styles', '-i', 'templates'],
 | 
			
		||||
    stdout=fp, stderr=fp)
 | 
			
		||||
 | 
			
		||||
if not settings.PRODUCTION:
 | 
			
		||||
 
 | 
			
		||||
@@ -64,7 +64,7 @@ class RemoveUnminifiedFilesMixin:
 | 
			
		||||
            return []
 | 
			
		||||
 | 
			
		||||
        root = settings.STATIC_ROOT
 | 
			
		||||
        to_remove = ['templates', 'styles', 'js']
 | 
			
		||||
        to_remove = ['js']
 | 
			
		||||
 | 
			
		||||
        for tree in to_remove:
 | 
			
		||||
            shutil.rmtree(os.path.join(root, tree))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user