From b26c851f928a2ffb5c5fb58e5b46e161aa62be60 Mon Sep 17 00:00:00 2001 From: Julian Feinauer Date: Sat, 2 Jan 2021 10:11:05 +0100 Subject: [PATCH 1/2] Add Stimulus to init installation. --- webpack_tools/management/commands/webpack.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webpack_tools/management/commands/webpack.py b/webpack_tools/management/commands/webpack.py index 6dcc974..20a3662 100644 --- a/webpack_tools/management/commands/webpack.py +++ b/webpack_tools/management/commands/webpack.py @@ -8,6 +8,10 @@ class Command(BaseCommand): help = 'Runs the webpack build...' + packages = [ + "stimulus" + ] + dev_packages = [ "webpack", "webpack-cli", @@ -72,7 +76,7 @@ def npm_install_dev_dependencies(self, *args, **options): if options['loop']: results = {} - for package in self.dev_packages: + for package in self.dev_packages + self.packages: self.stdout.write(f'Installing package {package}') response = subprocess.run(["npm", "install", "--save-dev", package]) results.update({package: response}) @@ -85,6 +89,6 @@ def npm_install_dev_dependencies(self, *args, **options): self.stdout.write(self.style.WARNING(f'There were errors when installing packages...')) else: self.stdout.write(f'Installing all packages at once {self.dev_packages}') - response = subprocess.run(["npm", "install", "--save-dev"] + self.dev_packages) + response = subprocess.run(["npm", "install", "--save-dev"] + (self.dev_packages + self.packages)) if response.returncode != 0: self.stdout.write(self.style.WARNING(f'There were errors when installing packages...')) From 9c5ab43a0b15ed9bc3de3f32c084b0dfd8726c8c Mon Sep 17 00:00:00 2001 From: Julian Feinauer Date: Mon, 4 Jan 2021 15:00:48 +0100 Subject: [PATCH 2/2] Added glob as well as it was also missing as dev dependency. --- webpack_tools/management/commands/webpack.py | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack_tools/management/commands/webpack.py b/webpack_tools/management/commands/webpack.py index 20a3662..268c02a 100644 --- a/webpack_tools/management/commands/webpack.py +++ b/webpack_tools/management/commands/webpack.py @@ -13,6 +13,7 @@ class Command(BaseCommand): ] dev_packages = [ + "glob", "webpack", "webpack-cli", "webpack-bundle-analyzer",