Skip to content

Commit

Permalink
Merge pull request #18 from Muetze42/development
Browse files Browse the repository at this point in the history
Dirty fix for failed CSS import
  • Loading branch information
Muetze42 authored Sep 9, 2022
2 parents fb16f1c + 2674224 commit 87acbad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Console/Commands/CustomAssetsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,16 @@ protected function publishNovaAssets(): void
*/
protected function npmProduction(): void
{
$fontsCSS = $this->novaStorage->get('resources/css/fonts.css');
$novaCSS = $this->novaStorage->get('resources/css/nova.css');
$appCSS = $this->novaStorage->get('resources/css/app.css');
$replace = [
'@import \'nova\';' => $novaCSS,
'@import \'fonts\';' => $fontsCSS,
];
$appCSS = str_replace(array_keys($replace), array_values($replace), $appCSS);
$this->novaStorage->put('resources/css/app.css', $appCSS);

$this->info('Run NPM production');
$command = 'cd '.$this->novaPath.' && '.$this->npmCommand.' run production';
$this->process->runCommand($command);
Expand Down

0 comments on commit 87acbad

Please sign in to comment.