Skip to content

Commit f5ad213

Browse files
Default Tame-Artisan Command added
1 parent 48e9f90 commit f5ad213

File tree

4 files changed

+18
-33
lines changed

4 files changed

+18
-33
lines changed

Capsule/Dummy/dummyTame.dum

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,12 @@ include_once __DIR__ . "/vendor/autoload.php";
3030

3131
$artisan = new Tamedevelopers\Support\Capsule\Artisan();
3232

33+
/**
34+
* Register the default Support Command Name
35+
*/
36+
$artisan->register(
37+
'make', new Tamedevelopers\Support\Commands\MakeCommand, 'Make Artisans'
38+
);
39+
40+
3341
exit($artisan->run($argv));

ComposerPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public static function getSubscribedEvents(): array
2424
];
2525
}
2626

27+
// Run package post-install logic
2728
public function onPostInstall(): void
2829
{
29-
// Run package post-install logic
3030
Installer::install();
3131
}
3232

33+
// Run package post-update logic
3334
public function onPostUpdate(): void
3435
{
35-
// Run package post-update logic
3636
Installer::update();
3737
}
3838
}

Installer.php

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,20 @@ public static function update()
2727
self::publishDefaults();
2828
}
2929

30-
/**
31-
* Backward-compat: called by ComposerPlugin hooks
32-
*/
33-
public static function postInstall(): void
34-
{
35-
self::install();
36-
}
37-
38-
/**
39-
* Backward-compat: called by ComposerPlugin hooks
40-
*/
41-
public static function postUpdate(): void
42-
{
43-
self::update();
44-
}
45-
4630
/**
4731
* Dump default files into the user project root
4832
*/
4933
protected static function publishDefaults()
5034
{
51-
// if app is running inside of a framework
52-
$frameworkChecker = (new Tame)->isAppFramework();
53-
54-
// if application is not a framework,
55-
// then we can start dupping default needed files
56-
if(! $frameworkChecker){
57-
// dummy paths to be created
58-
$paths = self::getPathsData(realpath(__DIR__));
35+
// dummy paths to be created
36+
$paths = self::getPathsData(realpath(__DIR__));
5937

60-
// only create when files are not present
61-
if(self::isDummyNotPresent($paths)){
62-
// create for [tame]
63-
self::createTameBash($paths);
38+
// only create when files are not present
39+
if(self::isDummyNotPresent($paths)){
40+
// create for [tame]
41+
self::createTameBash($paths);
6442

65-
Logger::info("\n<b>[Tame-Artisan]</b> has been created automatically!\n\nUsage: \n php tame <command> [:option] [arguments]\n\n");
66-
}
43+
Logger::info("\n<b>[Tame-Artisan]</b> has been created automatically!\n\nUsage: \n php tame <command> [:option] [arguments]\n\n");
6744
}
6845
}
6946

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
],
3333
"post-update-cmd": [
3434
"Tamedevelopers\\Support\\Installer::update"
35-
]
35+
]
3636
},
3737
"suggest": {
3838
"dompdf/dompdf": "Required to use the `PDF` class and helper (^3.0)"

0 commit comments

Comments
 (0)