Skip to content

Commit 779bc96

Browse files
committed
adding a post-create-project-cmd
1 parent 3b7f54b commit 779bc96

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/PatternLab/InstallerUtil.php

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,44 @@ public static function postRootPackageInstall($event) {
439439

440440
}
441441

442+
/**
443+
* Ask questions after the create package is done
444+
* @param {Object} a script event object from composer
445+
*/
446+
public static function postCreateProjectCmd($event) {
447+
448+
print $event->getOperation()->getPackage()->getName();
449+
450+
// run the console and config inits
451+
/*self::init();
452+
453+
print_r($event)
454+
if (Config::getOption("patternExtension")) {
455+
456+
}
457+
$input = Console::promptInput("Install the base StarterKit for Twig?","(Y/n)");
458+
459+
if ($input == "y") {
460+
$patternEngine = Config::getOption("patternExtension");
461+
$starterkit = "pattern-lab/starterkit-".$patternEngine."-base";
462+
}
463+
464+
if ($starterkit) {
465+
466+
// download the starterkit
467+
$f = new Fetch();
468+
$f->fetchStarterKit($starterkit);
469+
470+
} else if ($input == "n") {
471+
472+
} else {
473+
Console::writeWarning("i didn't understand that input. so you can just set that up after the install finishes");
474+
}
475+
*/
476+
477+
}
478+
479+
442480
/**
443481
* Make sure pattern engines and listeners are removed on uninstall
444482
* @param {Object} a script event object from composer

0 commit comments

Comments
 (0)