Skip to content

Commit

Permalink
Replace Mix build command with Vite build
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 10, 2024
1 parent 8d19318 commit 12d963a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:

- name: Build assets for production
working-directory: 'packages/hydefront'
run: npm run prod
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
run: sed -i 's/\.\/vendor\/hyde\/framework\/resources\/views\/\*\*\/\*\.blade\.php/\.\/packages\/framework\/resources\/views\/\*\*\/\*\.blade\.php/' tailwind.config.js

- name: Build assets for production
run: npm run prod
run: npm run build

- name: Copy compiled app.css file to HydeFront dist folder
run: cp _media/app.css packages/hydefront/dist/app.css
Expand Down
2 changes: 1 addition & 1 deletion monorepo/docs/hydefront.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This will create commits in both the monorepo and submodule. Now follow the foll

1. Verify that both commits are correct.
2. Build the new `app.css` through the monorepo
- [ ] `npm run prod`
- [ ] `npm run build`
3. Copy the compiled file to the HydeFront repository so it can be served from the CDN.
- [ ] `cp _media/app.css packages/hydefront/dist/app.css`
4. Amend the HydeFront commit with the new `app.css` file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function runPostBuildActions(): void
}

if ($this->option('run-prod')) {
$this->runNodeCommand('npm run prod', 'Building frontend assets for production!');
$this->runNodeCommand('npm run build', 'Building frontend assets for production!');
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/framework/tests/Feature/StaticSiteServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function testNodeActionOutputs()

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

public function testPrettyUrlsOptionOutput()
Expand Down
2 changes: 1 addition & 1 deletion packages/hydefront/.github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: npm ci

- name: Build assets for production
run: npm run prod
run: npm run build

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion packages/hydefront/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Hyde stylesheet contains a small set of styles that don't make sense to use
Normally, this file is imported into the main.css file.

- **App.css**:
A compiled and minified file containing the TailwindCSS styles for a base Hyde installation. It includes the Hyde.css file. This file is identical to what one would get by running `npm run prod` in a new HydePHP project (which incidentally is exactly how this file is generated).
A compiled and minified file containing the TailwindCSS styles for a base Hyde installation. It includes the Hyde.css file. This file is identical to what one would get by running `npm run build` in a new HydePHP project (which incidentally is exactly how this file is generated).


## Usage
Expand Down

0 comments on commit 12d963a

Please sign in to comment.