-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.php
48 lines (43 loc) · 1.07 KB
/
make.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
<?php
/*
* X Framework Maker.
* this is simple php script, to pack all components
* in the right order and outputs. if the variable $file
* is passed on the request, then a file $file.js
* will be created. and you can use this like preprocessor to.
*/
$xVersion = "1.4 Beta";
$xDate = date(DATE_RSS);
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);
$lib_path = dirname(__FILE__) . "/xLib/";
$components = array(
'xUtils',
'xCore',
'xType',
'xBrowser',
'xSelector',
'xJax',
'xFx',
'xLib',
'xEvent',
'xDrag',
'xDataSet'
);
$len = sizeof($components);
if (isset($_REQUEST['file']))
ob_start();
include "LICENSE.x";
for ($i = 0; $i < $len; $i++) {
if ($_REQUEST['show_names'])
echo "/*\n * $components[$i]\n */\n";
else
echo PHP_EOL;
include "$lib_path$components[$i].js";
echo PHP_EOL;
}
header('Content-type: application/x-javascript');
if (isset($_REQUEST['file'])) {
$ob = ob_get_clean();
file_put_contents($_REQUEST['file'], $ob);
echo $ob;
}