-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tree command and changed README
- Loading branch information
1 parent
7aecf24
commit 8e7b228
Showing
12 changed files
with
89 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/de/interaapps/uppm/commands/PackageTreeCommand.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
namespace de\interaapps\uppm\commands; | ||
|
||
use de\interaapps\ulole\core\cli\Colors; | ||
use de\interaapps\uppm\config\Configuration; | ||
|
||
class PackageTreeCommand extends Command { | ||
public function execute(array $args) { | ||
$this->printOut($this->uppm->getCurrentProject()->getConfig()); | ||
} | ||
|
||
private function printOut(Configuration $config, $indent = '', $prefix = '📁') { | ||
$this->uppm->getLogger()->log("{$indent}{$prefix} §h{$config->name} §g{$config->version}§f"); | ||
|
||
$i = 0; | ||
foreach ($config->modules as $module => $version) { | ||
$i++; | ||
$modConfig = Configuration::fromFile($this->uppm->getCurrentDir() . "/modules/$module/uppm.json"); | ||
|
||
if ($modConfig != null) { | ||
$this->printOut($modConfig, "$indent ", '📦'); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
namespace de\interaapps\uppm\commands; | ||
|
||
class RemoveCommand extends Command { | ||
public function execute(array $args) { | ||
$this->uppm->getLogger()->loadingBar(0, "Removing package..."); | ||
$project = $this->uppm->getCurrentProject(); | ||
|
||
|
||
if (count($args) > 0) { | ||
foreach ($args as $arg) { | ||
$split = explode(":", $arg); | ||
|
||
unset($project->getConfig()->modules->{$split[0]}); | ||
$project->getConfig()->save($this->uppm); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
<?php | ||
|
||
namespace de\interaapps\uppm\package; | ||
|
||
use de\interaapps\uppm\helper\Web; | ||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters