Skip to content

Commit f413c89

Browse files
committed
Remove --run-prettier flag from build command
The --run-prettier flag and its related code have been removed from the build command, documentation, and tests. This is a breaking change and is reflected in the release notes and user documentation.
1 parent ff11d41 commit f413c89

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ This serves two purposes:
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)
7676
- **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)
77+
- **Breaking:** Removed `--run-prettier` build command flag
7778
- **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.
7879
- **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.
7980
- **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.
@@ -577,6 +578,7 @@ The new asset system is a complete rewrite of the HydeFront asset handling syste
577578
- Replaced Laravel Mix with Vite. ([#2010])
578579
- You must now use `npm run build` to compile your assets, instead of `npm run prod`.
579580
- Removed `--run-dev` and `--run-prod` build command flags, replaced by `--vite`. ([#2013])
581+
- Removed `--run-prettier` build command flag.
580582
- Removed `DocumentationPage::getTableOfContents()` method. Table of contents are now generated using a Blade component. ([#2045])
581583
- Removed `hyde.css` from HydeFront, requiring recompilation of assets if you were extending it. ([#2037])
582584
- 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: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,18 @@ 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 [--vite] [--run-prettier] [--pretty-urls] [--no-api]
69+
php hyde build [--vite] [--pretty-urls] [--no-api]
7070
```
7171

7272
Build the static site
7373

7474
#### Options
7575

76-
| | |
77-
|------------------|--------------------------------------------|
78-
| `--vite` | Build frontend assets using Vite |
79-
| `--run-prettier` | Format the output using NPM Prettier |
80-
| `--pretty-urls` | Should links in output use pretty URLs? |
81-
| `--no-api` | Disable API calls, for example, Torchlight |
76+
| | |
77+
|-----------------|--------------------------------------------|
78+
| `--vite` | Build frontend assets using Vite |
79+
| `--pretty-urls` | Should links in output use pretty URLs? |
80+
| `--no-api` | Disable API calls, for example, Torchlight |
8281

8382
## Run the static site builder for a single file
8483

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ class BuildSiteCommand extends Command
2727
/** @var string */
2828
protected $signature = 'build
2929
{--vite : Build frontend assets using Vite}
30-
{--run-prettier : Format the output using NPM Prettier}
3130
{--pretty-urls : Should links in output use pretty URLs?}
3231
{--no-api : Disable API calls, for example, Torchlight}
3332
{--run-dev : [Removed] Use --vite instead}
@@ -98,14 +97,6 @@ protected function runPreBuildActions(): void
9897
public function runPostBuildActions(): void
9998
{
10099
$this->taskService->runPostBuildTasks();
101-
102-
if ($this->option('run-prettier')) {
103-
$this->runNodeCommand(
104-
'npx prettier '.Hyde::pathToRelative(Hyde::sitePath()).'/**/*.html --write --bracket-same-line',
105-
'Prettifying code!',
106-
'prettify code'
107-
);
108-
}
109100
}
110101

111102
protected function printFinishMessage(float $timeStart): void

packages/framework/tests/Feature/StaticSiteServiceTest.php

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

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

166165
Process::assertRan(fn ($process) => $process->command === 'npm run build');
167-
Process::assertRan(fn ($process) => $process->command === 'npx prettier '.Hyde::pathToRelative(Hyde::sitePath()).'/**/*.html --write --bracket-same-line');
168166
}
169167

170168
public function testPrettyUrlsOptionOutput()

0 commit comments

Comments
 (0)