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

Commit 66b2d1b

Browse files
Kasper LaukampKasper Laukamp
authored andcommitted
Fixed for good now...
1 parent 852905f commit 66b2d1b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Commands/PipeDreamBuild.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public function handle()
3333
$this->info("Rebuilding PipeDream...");
3434

3535
$appJSPath = __DIR__ . "/../resources/js/app.js";
36+
$PDFolder = __DIR__ . "/../../";
3637
$app = file_get_contents($appJSPath);
3738
$nodeModules = base_path() . DIRECTORY_SEPARATOR . "node_modules";
3839

@@ -76,8 +77,13 @@ public function handle()
7677

7778
file_put_contents($appJSPath, $overwritten);
7879

80+
if(!file_exists($PDFolder . "node_modules")){
81+
$this->info("Building PipeDream Node modules...");
82+
exec("cd " . $PDFolder . " && npm install");
83+
}
84+
7985
$this->info("Compiling...");
80-
if(!exec("npm run dev --prefix " . __DIR__ . '/../../')){
86+
if (!exec("cd " . $PDFolder . " && npm run dev")) {
8187
$this->info("!!!Something went wrong when compiling!!!");
8288
file_put_contents($appJSPath, $app);
8389
exit(0);

0 commit comments

Comments
 (0)