Skip to content

Commit

Permalink
[1.x] Adds vite support (#189)
Browse files Browse the repository at this point in the history
* Adds vite support

* Apply fixes from StyleCI

Co-authored-by: StyleCI Bot <[email protected]>
  • Loading branch information
nunomaduro and StyleCIBot authored Jul 12, 2022
1 parent d634208 commit a383f12
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/Commands/EnvCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Laravel\VaporCli\GitIgnore;
use Laravel\VaporCli\Helpers;
use Laravel\VaporCli\Manifest;
use Laravel\VaporCli\Path;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;

Expand Down Expand Up @@ -49,7 +50,9 @@ public function handle()
'build' => [
'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev',
'php artisan event:cache',
'npm ci && npm run prod && rm -rf node_modules',
file_exists(Path::current().'/webpack.mix.js')
? 'npm ci && npm run prod && rm -rf node_modules'
: 'npm ci && npm run build && rm -rf node_modules',
],
]);

Expand Down
8 changes: 6 additions & 2 deletions src/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ protected static function freshConfiguration($project)
'build' => [
'COMPOSER_MIRROR_PATH_REPOS=1 composer install --no-dev',
'php artisan event:cache',
'npm ci && npm run prod && rm -rf node_modules',
file_exists(Path::current().'/webpack.mix.js')
? 'npm ci && npm run prod && rm -rf node_modules'
: 'npm ci && npm run build && rm -rf node_modules',
],
]),
'staging' => array_filter([
Expand All @@ -233,7 +235,9 @@ protected static function freshConfiguration($project)
'build' => [
'COMPOSER_MIRROR_PATH_REPOS=1 composer install',
'php artisan event:cache',
'npm ci && npm run dev && rm -rf node_modules',
file_exists(Path::current().'/webpack.mix.js')
? 'npm ci && npm run dev && rm -rf node_modules'
: 'npm ci && npm run build && rm -rf node_modules',
],
]),
],
Expand Down

0 comments on commit a383f12

Please sign in to comment.