-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnevermind.php
More file actions
44 lines (36 loc) · 1.19 KB
/
nevermind.php
File metadata and controls
44 lines (36 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
/*
* This file is part of the `kminek/nevermind` package.
*/
require 'vendor/autoload.php';
use Kminek\Nevermind\Config;
use Kminek\Nevermind\Runner;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\SingleCommandApplication;
$app = new SingleCommandApplication();
$app
->addArgument(
'name',
InputArgument::REQUIRED,
'Project name e.g. [todo] or [vendor/todo]'
)
->setCode(function (InputInterface $input, OutputInterface $output) {
$name = $input->getArgument('name');
$config = new Config([
'name' => $name,
'storage_dir' => __DIR__.'/storage',
]);
$output->writeln(sprintf('Creating project [%s]', $name));
$runner = new Runner($output, $config, [
\Kminek\Nevermind\Task\CloneLaravel::class,
\Kminek\Nevermind\Task\ComposerInstall::class,
\Kminek\Nevermind\Task\FreezeDependencies::class,
\Kminek\Nevermind\Task\ComposerInstall::class,
]);
$runner->run();
})
->run()
;