-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmint.php
60 lines (46 loc) · 1.41 KB
/
mint.php
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace global;
require_once __DIR__ . '/support/lib/vendor/autoload.php';
error_reporting(0);
use Exception;
use \Approach\Imprint\Imprint;
use \Approach\Service\format;
use \Approach\Service\target;
use \Approach\path;
use \Approach\Scope;
$path_to_project = __DIR__ . '/src';
$path_to_approach = __DIR__ . '/support/lib/approach/';
$path_to_support = __DIR__ . '//support//';
$scope = new Scope(
project: 'ClimbUI',
path: [
path::project->value => $path_to_project,
path::installed->value => $path_to_approach,
path::support->value => $path_to_support,
],
);
$fileDir = $scope->GetPath(path::pattern);
$fileDir = str_replace('/../', '', $fileDir);
$imp = new Imprint(
imprint: 'Climb.xml',
imprint_dir: __DIR__.'/support/pattern/',
);
$settings = new Imprint(
imprint: 'Settings.xml',
imprint_dir: __DIR__.'/support/pattern/',
);
$success = $imp->Prepare();
$settingsSuccess = $settings->Prepare();
$imp2 = new Imprint(
imprint: 'Climb.xml',
imprint_dir: __DIR__ . '/support/pattern/',
);
$success2 = $imp2->Prepare();
echo '<!DOCTYPE html>' . PHP_EOL.'<html>'.PHP_EOL. '<head><title>Quick Mint</title>' . PHP_EOL.'<body><pre>';
echo 'Minting Viewer..'.PHP_EOL;
$imp->Mint('Viewer');
echo 'Minting Editor..'.PHP_EOL;
$imp2->Mint('Editor');
echo 'Minting Settings..'.PHP_EOL;
$settings->Mint('Settings');
echo 'Done'.PHP_EOL. '</pre></body>' . PHP_EOL.'</html>';