Skip to content

Commit 7e998a2

Browse files
committed
Replace --run-dev and --run-prod build flags with --run-vite
1 parent 3b89ec0 commit 7e998a2

File tree

4 files changed

+6
-13
lines changed

4 files changed

+6
-13
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ This serves two purposes:
9292
- **Breaking:** You must now use `npm run build` to compile your assets, instead of `npm run prod`
9393
- Bundled assets are now compiled directly into the `_media` folder, and will not be copied to the `_site/media` folder by the NPM command in https://github.com/hydephp/develop/pull/2011
9494
- The realtime compiler now only serves assets from the media source directory (`_media`), and no longer checks the site output directory (`_site/media`) in https://github.com/hydephp/develop/pull/2012
95+
- **Breaking:** Replaced `--run-dev` and `--run-prod` build command flags with a single `--run-vite` flag that uses Vite to build assets in https://github.com/hydephp/develop/pull/2013
9596

9697
### Deprecated
9798

docs/getting-started/console-commands.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Here is a quick reference of all the available commands. You can also run `php h
6666
<a name="build" style="display: inline-block; position: absolute; margin-top: -5rem;"></a>
6767

6868
```bash
69-
php hyde build [--run-dev] [--run-prod] [--run-prettier] [--pretty-urls] [--no-api]
69+
php hyde build [--run-vite] [--run-prettier] [--pretty-urls] [--no-api]
7070
```
7171

7272
Build the static site
@@ -75,8 +75,7 @@ Build the static site
7575

7676
| | |
7777
|------------------|--------------------------------------------|
78-
| `--run-dev` | Run the NPM dev script after build |
79-
| `--run-prod` | Run the NPM prod script after build |
78+
| `--run-vite` | Build frontend assets using Vite |
8079
| `--run-prettier` | Format the output using NPM Prettier |
8180
| `--pretty-urls` | Should links in output use pretty URLs? |
8281
| `--no-api` | Disable API calls, for example, Torchlight |

packages/framework/src/Console/Commands/BuildSiteCommand.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class BuildSiteCommand extends Command
2626
{
2727
/** @var string */
2828
protected $signature = 'build
29-
{--run-dev : Run the NPM dev script after build}
30-
{--run-prod : Run the NPM prod script after build}
29+
{--run-vite : Build frontend assets using Vite}
3130
{--run-prettier : Format the output using NPM Prettier}
3231
{--pretty-urls : Should links in output use pretty URLs?}
3332
{--no-api : Disable API calls, for example, Torchlight}';
@@ -100,11 +99,7 @@ public function runPostBuildActions(): void
10099
);
101100
}
102101

103-
if ($this->option('run-dev')) {
104-
$this->runNodeCommand('npm run dev', 'Building frontend assets for development!');
105-
}
106-
107-
if ($this->option('run-prod')) {
102+
if ($this->option('run-vite')) {
108103
$this->runNodeCommand('npm run build', 'Building frontend assets for production!');
109104
}
110105
}

packages/framework/tests/Feature/StaticSiteServiceTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,12 @@ public function testNodeActionOutputs()
160160
{
161161
Process::fake();
162162

163-
$this->artisan('build --run-prettier --run-dev --run-prod')
163+
$this->artisan('build --run-prettier --run-vite')
164164
->expectsOutput('Prettifying code! This may take a second.')
165-
->expectsOutput('Building frontend assets for development! This may take a second.')
166165
->expectsOutput('Building frontend assets for production! This may take a second.')
167166
->assertExitCode(0);
168167

169168
Process::assertRan(fn ($process) => $process->command === 'npx prettier '.Hyde::pathToRelative(Hyde::sitePath()).'/**/*.html --write --bracket-same-line');
170-
Process::assertRan(fn ($process) => $process->command === 'npm run dev');
171169
Process::assertRan(fn ($process) => $process->command === 'npm run build');
172170
}
173171

0 commit comments

Comments
 (0)