-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathpug
35 lines (30 loc) · 833 Bytes
/
pug
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
#!/usr/bin/env php
<?php
use Phug\Cli;
$autoload = 'vendor/autoload.php';
if (!file_exists($autoload)) {
$autoload = __DIR__.'/../autoload.php';
}
if (!file_exists($autoload)) {
$autoload = __DIR__.'/../../autoload.php';
}
if (!file_exists($autoload)) {
$autoload = __DIR__.'/vendor/autoload.php';
}
if (!file_exists($autoload)) {
throw new \RuntimeException('Autoload not found. Please run: composer install');
}
include $autoload;
$cli = new Cli('Pug\Facade', [
'render',
'renderFile',
'renderDirectory',
'compile',
'compileFile',
'compileDirectory' => 'textualCacheDirectory',
'display' => 'render',
'displayFile' => 'renderFile',
'displayDirectory' => 'renderDirectory',
'cacheDirectory' => 'textualCacheDirectory',
]);
exit($cli->run($argv) ? 0 : 1);