forked from orynider/SVG-Icon-Font-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.php
32 lines (25 loc) · 843 Bytes
/
build.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
<?php
/*
* Copyright MADE/YOUR/DAY <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$pharPath = __DIR__.'/svg-icon-font-generator.phar';
if(file_exists($pharPath)){
unlink($pharPath);
}
$phar = new Phar($pharPath);
$phar->setStub($phar->createDefaultStub('run.php'));
$files = new AppendIterator;
$files->append(new ArrayIterator(array(
'run.php' => __DIR__.'/run.php',
)));
$files->append(new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(__DIR__.'/src', FilesystemIterator::SKIP_DOTS)
));
$files->append(new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(__DIR__.'/vendor', FilesystemIterator::SKIP_DOTS)
));
$phar->buildFromIterator($files, __DIR__);
echo "created svg-icon-font-generator.phar\n";