Skip to content

Commit 126fc53

Browse files
authored
Merge pull request #2311 from hydephp/rename-vite-build-flag
[2.x] Rename --run-vite flag to --vite in build command
2 parents ede6b26 + ff11d41 commit 126fc53

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This serves two purposes:
7373
- **Breaking:** Renamed class `DataCollections` to `DataCollection` in [#1732](https://github.com/hydephp/develop/pull/1732) For more information, see below.
7474
- **Breaking:** Renamed the `hyde.enable_cache_busting` configuration option to `hyde.cache_busting` in [#1980](https://github.com/hydephp/develop/pull/1980)
7575
- **Breaking:** Renamed the `hyde.navigation.subdirectories` configuration option to `hyde.navigation.subdirectory_display` in [#1818](https://github.com/hydephp/develop/pull/1818)
76-
- **Breaking:** Replaced `--run-dev` and `--run-prod` build command flags with a single `--run-vite` flag that uses Vite to build assets in [#2013](https://github.com/hydephp/develop/pull/2013)
76+
- **Breaking:** Replaced `--run-dev` and `--run-prod` build command flags with a single `--vite` flag that uses Vite to build assets in [#2013](https://github.com/hydephp/develop/pull/2013)
7777
- **Breaking:** The `Author::create()` method now returns an array instead of a `PostAuthor` instance in [#1798](https://github.com/hydephp/develop/pull/1798) For more information, see below.
7878
- **Breaking:** The `Author::get()` method now returns `null` if an author is not found, rather than creating a new instance in [#1798](https://github.com/hydephp/develop/pull/1798) For more information, see below.
7979
- **Breaking:** The `hyde.authors` config setting should now be keyed by the usernames in [#1782](https://github.com/hydephp/develop/pull/1782) For more information, see below.
@@ -555,7 +555,7 @@ The new asset system is a complete rewrite of the HydeFront asset handling syste
555555
- Added a new `npm run build` command for compiling frontend assets with Vite.
556556
- Added Vite facade for Blade templates.
557557
- Added Vite Hot Module Replacement (HMR) support to the realtime compiler.
558-
- Build command now uses Vite to compile assets when the `--run-vite` flag is passed.
558+
- Build command now uses Vite to compile assets when the `--vite` flag is passed.
559559

560560
- **Improved HydeFront integration.** ([#2024], [#2029], [#2031], [#2036], [#2037], [#2038], [#2039])
561561
- HydeFront styles are now refactored into Tailwind.
@@ -576,7 +576,7 @@ The new asset system is a complete rewrite of the HydeFront asset handling syste
576576

577577
- Replaced Laravel Mix with Vite. ([#2010])
578578
- You must now use `npm run build` to compile your assets, instead of `npm run prod`.
579-
- Removed `--run-dev` and `--run-prod` build command flags, replaced by `--run-vite`. ([#2013])
579+
- Removed `--run-dev` and `--run-prod` build command flags, replaced by `--vite`. ([#2013])
580580
- Removed `DocumentationPage::getTableOfContents()` method. Table of contents are now generated using a Blade component. ([#2045])
581581
- Removed `hyde.css` from HydeFront, requiring recompilation of assets if you were extending it. ([#2037])
582582
- Changed how HydeFront is included in projects. Instead of separate `hyde.css` and `app.css`, all styles are now in `app.css`. ([#2024])

docs/getting-started/console-commands.md

Lines changed: 2 additions & 2 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-vite] [--run-prettier] [--pretty-urls] [--no-api]
69+
php hyde build [--vite] [--run-prettier] [--pretty-urls] [--no-api]
7070
```
7171

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

7676
| | |
7777
|------------------|--------------------------------------------|
78-
| `--run-vite` | Build frontend assets using Vite |
78+
| `--vite` | Build frontend assets using Vite |
7979
| `--run-prettier` | Format the output using NPM Prettier |
8080
| `--pretty-urls` | Should links in output use pretty URLs? |
8181
| `--no-api` | Disable API calls, for example, Torchlight |

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class BuildSiteCommand extends Command
2626
{
2727
/** @var string */
2828
protected $signature = 'build
29-
{--run-vite : Build frontend assets using Vite}
29+
{--vite : Build frontend assets using Vite}
3030
{--run-prettier : Format the output using NPM Prettier}
3131
{--pretty-urls : Should links in output use pretty URLs?}
3232
{--no-api : Disable API calls, for example, Torchlight}
33-
{--run-dev : [Removed] Use --run-vite instead}
34-
{--run-prod : [Removed] Use --run-vite instead}';
33+
{--run-dev : [Removed] Use --vite instead}
34+
{--run-prod : [Removed] Use --vite instead}';
3535

3636
/** @var string */
3737
protected $description = 'Build the static site';
@@ -88,7 +88,7 @@ protected function runPreBuildActions(): void
8888
Config::set(['hyde.pretty_urls' => true]);
8989
}
9090

91-
if ($this->option('run-vite')) {
91+
if ($this->option('vite')) {
9292
$this->runNodeCommand('npm run build', 'Building frontend assets for production!');
9393
}
9494

@@ -161,7 +161,7 @@ protected function getExitCode(): int
161161
/**
162162
* This method is called when the removed --run-dev or --run-prod options are used.
163163
*
164-
* @deprecated Use --run-vite instead
164+
* @deprecated Use --vite instead
165165
* @since v2.0 - This will be removed after 2-3 minor releases depending on the timeframe between them. (~v2.3)
166166
*
167167
* @codeCoverageIgnore
@@ -170,7 +170,7 @@ protected function checkForDeprecatedRunMixCommandUsage(): void
170170
{
171171
if ($this->option('run-dev') || $this->option('run-prod')) {
172172
$this->error('The --run-dev and --run-prod options have been removed in HydePHP v2.0.');
173-
$this->info('Please use --run-vite instead to build assets for production with Vite.');
173+
$this->info('Please use --vite instead to build assets for production with Vite.');
174174
$this->line('See https://github.com/hydephp/develop/pull/2013 for more information.');
175175

176176
exit(Command::INVALID);

packages/framework/tests/Feature/StaticSiteServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function testNodeActionOutputs()
158158
{
159159
Process::fake();
160160

161-
$this->artisan('build --run-prettier --run-vite')
161+
$this->artisan('build --run-prettier --vite')
162162
->expectsOutput('Building frontend assets for production! This may take a second.')
163163
->expectsOutput('Prettifying code! This may take a second.')
164164
->assertExitCode(0);

0 commit comments

Comments
 (0)