Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
Fixed for good now...
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Laukamp authored and Kasper Laukamp committed Mar 4, 2020
1 parent 852905f commit 66b2d1b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Commands/PipeDreamBuild.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function handle()
$this->info("Rebuilding PipeDream...");

$appJSPath = __DIR__ . "/../resources/js/app.js";
$PDFolder = __DIR__ . "/../../";
$app = file_get_contents($appJSPath);
$nodeModules = base_path() . DIRECTORY_SEPARATOR . "node_modules";

Expand Down Expand Up @@ -76,8 +77,13 @@ public function handle()

file_put_contents($appJSPath, $overwritten);

if(!file_exists($PDFolder . "node_modules")){
$this->info("Building PipeDream Node modules...");
exec("cd " . $PDFolder . " && npm install");
}

$this->info("Compiling...");
if(!exec("npm run dev --prefix " . __DIR__ . '/../../')){
if (!exec("cd " . $PDFolder . " && npm run dev")) {
$this->info("!!!Something went wrong when compiling!!!");
file_put_contents($appJSPath, $app);
exit(0);
Expand Down

0 comments on commit 66b2d1b

Please sign in to comment.