Skip to content

Commit

Permalink
Merge pull request #4 from PHPBrickLayer/dev
Browse files Browse the repository at this point in the history
Added the ability to create default domain on composer install if ent…
  • Loading branch information
leonardosahon authored Dec 23, 2023
2 parents 5c1f785 + 2bcb4e0 commit 63abf21
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/BobDBuilder/Cmd/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,15 @@ public function create(): void
// copy helper js file to project lay folder
new LayCopyDir($server->lay_static . "js", $server->shared . "lay");

if($tag == "--fresh-project") {
if($tag == "--fresh-project")
$this->plug->write_info("Fresh project detected!");

// create a default domain folder
new BobExec("make:domain Default * --force --silent");
// create a default domain folder if not exists
if(!is_dir($this->plug->server->domains . "Default"))
new BobExec("make:domain Default * --silent");

// link lay folder to default folder
$s = DIRECTORY_SEPARATOR;
new BobExec("link:dir web{$s}shared{$s}lay web{$s}domains{$s}Default{$s}lay --silent");

$this->plug->write_info("Default domain folder created successfully!");
}
// link lay folder to default folder
$s = DIRECTORY_SEPARATOR;
new BobExec("link:dir web{$s}shared{$s}lay web{$s}domains{$s}Default{$s}lay --silent");
}
}

0 comments on commit 63abf21

Please sign in to comment.