Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 600928d

Browse files
authored
Merge pull request #19 from modulusphp/feature/frontend-command-update
Feature/frontend command update
2 parents 59c48cc + 555cb0c commit 600928d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Commands/FrontendSwitch.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4646
$current = ModulusCLI::$appdir . 'resources';
4747
$package = ModulusCLI::$appdir . 'package.json';
4848
$lock = ModulusCLI::$appdir . 'package-lock.json';
49+
$webpack = ModulusCLI::$appdir . 'webpack.mix.js';
4950
$front = Template::assets() . 'frontend';
5051

5152
$helper = $this->getHelper('question');
@@ -69,8 +70,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
6970
Filesystem::delete($lock);
7071
}
7172

73+
if (file_exists($webpack)) {
74+
Filesystem::delete($webpack);
75+
}
76+
7277
Filesystem::copy($front . DIRECTORY_SEPARATOR . $frontend . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'js', $current . DIRECTORY_SEPARATOR .'js');
7378
Filesystem::copy($front . DIRECTORY_SEPARATOR . $frontend . DIRECTORY_SEPARATOR . 'package.json', $package);
79+
Filesystem::copy($front . DIRECTORY_SEPARATOR . $frontend . DIRECTORY_SEPARATOR . 'webpack.mix.js', $webpack);
7480

7581
return $output->writeln("<info>Successfully swicthed to \"{$frontend}\"</info>");
7682
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "modulusphp/console",
33
"description": "Modulus Commands",
4-
"version": "1.9.6.2",
4+
"version": "1.9.6.3",
55
"license": "MIT",
66
"type": "package",
77
"authors": [{

0 commit comments

Comments
 (0)