diff --git a/webpack_tools/management/commands/webpack.py b/webpack_tools/management/commands/webpack.py index 6dcc974..268c02a 100644 --- a/webpack_tools/management/commands/webpack.py +++ b/webpack_tools/management/commands/webpack.py @@ -8,7 +8,12 @@ class Command(BaseCommand): help = 'Runs the webpack build...' + packages = [ + "stimulus" + ] + dev_packages = [ + "glob", "webpack", "webpack-cli", "webpack-bundle-analyzer", @@ -72,7 +77,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 +90,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...'))