-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwingnut.php
More file actions
36 lines (30 loc) · 1.28 KB
/
Copy pathwingnut.php
File metadata and controls
36 lines (30 loc) · 1.28 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
<?php
require_once 'vendor/autoload.php';
$environment = new Wingnut\Environment();
$console = new Wingnut\Console\Console();
$console->addCommand(new Wingnut\Help($console), 'help', true);
$console->addCommands([
new Wingnut\Find($console, $environment),
new Wingnut\Map($console, $environment),
//new Wingnut\Dryrun($console),
//new Wingnut\Publish($console),
new Wingnut\Explain\Command($console),
//new Wingnut\PublishAll($console)
]);
/**
* We need the following commands:
*
* wingnut Find (filter) - lists all the files discovered by the filter
* wingnut Dryrun (publisher) - Creates all of the files associated with the publish cycle and dumps them into `tmp`
* wingnut Publish (publisher) - Creates all of the files associated with the publish cycle and copies them to the destination directory.
* wingnut Explain (config filename) - Explains all of the configuration delineated in the configuration file.
* wingnut publishAll - Runs all publishers sequentially.
* wingnut help find
* wingnut help dryrun
* wingnut help publish
*/
// The WindowsTextWriter strips all the linux/unix color codes from the output.
if(strpos(strtolower(php_uname()), 'windows') !== false) {
$console->setTextWriter(new Wingnut\Console\WindowsTextWriter());
}
$console->run();