Go for a more generic js bundling architecture

* Don't tie the output name to webpack itself
* Don't call js bundling webpack in python code
* Make the doc more generic about js bundling
This commit is contained in:
2024-11-18 15:36:05 +01:00
committed by Bartuccio Antoine
parent 3db1f592e2
commit 7b41051d0d
56 changed files with 73 additions and 73 deletions

View File

@ -7,11 +7,11 @@ from django.contrib.staticfiles.management.commands.collectstatic import (
)
from staticfiles.apps import GENERATED_ROOT, IGNORE_PATTERNS_SCSS
from staticfiles.processors import OpenApi, Scss, Webpack
from staticfiles.processors import JSBundler, OpenApi, Scss
class Command(CollectStatic):
"""Integrate webpack and css compilation to collectstatic"""
"""Integrate js bundling and css compilation to collectstatic"""
def add_arguments(self, parser):
super().add_arguments(parser)
@ -50,8 +50,8 @@ class Command(CollectStatic):
return Path(location)
Scss.compile(self.collect_scss())
OpenApi.compile() # This needs to be prior to webpack
Webpack.compile()
OpenApi.compile() # This needs to be prior to javascript bundling
JSBundler.compile()
collected = super().collect()