Skip to content

Commit 7cdba04

Browse files
committed
Fix #361 Rename --pretty option to --run-prettier
1 parent 1d92b74 commit 7cdba04

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Commands/HydeBuildStaticSiteCommand.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* Hyde Command to run the Build Process.
2222
*
2323
* @see \Tests\Feature\Commands\BuildStaticSiteCommandTest
24-
*
25-
* @todo #361 Rename --pretty option to --run-prettier to distinguish it better
2624
*/
2725
class HydeBuildStaticSiteCommand extends Command
2826
{
@@ -37,7 +35,7 @@ class HydeBuildStaticSiteCommand extends Command
3735
protected $signature = 'build
3836
{--run-dev : Run the NPM dev script after build}
3937
{--run-prod : Run the NPM prod script after build}
40-
{--pretty : Should the build files be prettified?}
38+
{--run-prettier : Should the build files be prettified?}
4139
{--pretty-urls : Should links in output use pretty URLs?}
4240
{--no-api : Disable external API calls, such as Torchlight}';
4341

@@ -154,7 +152,7 @@ public function purge(): void
154152
*/
155153
public function postBuildActions(): void
156154
{
157-
if ($this->option('pretty')) {
155+
if ($this->option('run-prettier')) {
158156
$this->runNodeCommand(
159157
'npx prettier '.Hyde::pathToRelative(Hyde::getSiteOutputPath($path)).'/ --write --bracket-same-line',
160158
'Prettifying code!',

tests/Feature/Commands/BuildStaticSiteCommandTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function test_handle_purge_method()
7979

8080
public function test_node_action_outputs()
8181
{
82-
$this->artisan('build --pretty --run-dev --run-prod')
82+
$this->artisan('build --run-prettier --run-dev --run-prod')
8383
->expectsOutput('Prettifying code! This may take a second.')
8484
->expectsOutput('Building frontend assets for development! This may take a second.')
8585
->expectsOutput('Building frontend assets for production! This may take a second.')

0 commit comments

Comments
 (0)