forked from Martin-Gleiss/smartvisu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d171f5
commit 2b58f87
Showing
35 changed files
with
3,242 additions
and
3,234 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,92 @@ | ||
<?php | ||
/** | ||
* ----------------------------------------------------------------------------- | ||
* @package smartVISU | ||
* @author Martin Gleiß | ||
* @copyright 2012 - 2015 | ||
* @license GPL [http://www.gnu.de] | ||
* ----------------------------------------------------------------------------- | ||
*/ | ||
|
||
// get config-variables | ||
require_once 'lib/includes.php'; | ||
require_once const_path_system.'functions.php'; | ||
require_once 'vendor/google.closure/smart_closure.php'; | ||
|
||
|
||
echo "<pre>\n"; | ||
echo str_repeat(" ", 69)."smart[VISU]\n"; | ||
echo str_repeat(" ", 68).date('H:i, d.m')."\n"; | ||
echo str_repeat("-", 80)."\n\n"; | ||
|
||
compile("lib/base/base.js"); | ||
echo "\n"; | ||
compile("lib/base/jquery.mobile.slider.js"); | ||
echo "\n"; | ||
|
||
echo "\n"; | ||
|
||
compile("widgets/widget.js"); | ||
echo "\n"; | ||
compile("widgets/animation.js"); | ||
echo "\n"; | ||
|
||
echo "\n"; | ||
|
||
compile("designs/cube.js"); | ||
echo "\n"; | ||
compile("designs/greenhornet.js"); | ||
echo "\n"; | ||
compile("designs/ice.js"); | ||
echo "\n"; | ||
compile("designs/night.js"); | ||
echo "\n"; | ||
compile("designs/sand.js"); | ||
echo "\n"; | ||
|
||
echo "\n"; | ||
|
||
compile("driver/io_domotiga.js"); | ||
echo "\n"; | ||
compile("driver/io_eibd.js"); | ||
echo "\n"; | ||
compile("driver/io_json.js"); | ||
echo "\n"; | ||
compile("driver/io_linknx.js"); | ||
echo "\n"; | ||
compile("driver/io_offline.js"); | ||
echo "\n"; | ||
compile("driver/io_smarthome.py.js"); | ||
echo "\n"; | ||
|
||
|
||
echo "\n"; | ||
echo str_repeat("-", 80)."\n\n"; | ||
echo "\n</pre>"; | ||
|
||
|
||
function compile($file) | ||
{ | ||
echo "<b>".$file."</b>\n"; | ||
|
||
if (is_file($file)) | ||
{ | ||
// compile it | ||
$c = new smartClosure(); | ||
$result = $c->add($file)->simpleMode()->_compile(); | ||
|
||
// write it | ||
$compiled = substr($result, strpos($result, '*/') + 3); | ||
$compiled = "/* smartVISU, Martin Gleiß, 2013, GPL [http://www.gnu.de] */\n".$compiled; | ||
filewrite(substr($file, 0, -3).".min.js", $compiled); | ||
|
||
// status | ||
$pos = strpos($result, '\'') + 1; | ||
echo str_replace(" Size", "", str_replace("\\n", ", ", substr($result, $pos + 50, strpos($result, ');') - $pos - 1 - 104))); | ||
echo "\n"; | ||
} | ||
else | ||
echo "...not found!\n"; | ||
} | ||
|
||
?> | ||
<?php | ||
/** | ||
* ----------------------------------------------------------------------------- | ||
* @package smartVISU | ||
* @author Martin Gleiß | ||
* @copyright 2012 - 2015 | ||
* @license GPL [http://www.gnu.de] | ||
* ----------------------------------------------------------------------------- | ||
*/ | ||
|
||
// get config-variables | ||
require_once 'lib/includes.php'; | ||
require_once const_path_system.'functions.php'; | ||
require_once 'vendor/google.closure/smart_closure.php'; | ||
|
||
|
||
echo "<pre>\n"; | ||
echo str_repeat(" ", 69)."smart[VISU]\n"; | ||
echo str_repeat(" ", 68).date('H:i, d.m')."\n"; | ||
echo str_repeat("-", 80)."\n\n"; | ||
|
||
compile("lib/base/base.js"); | ||
echo "\n"; | ||
compile("lib/base/jquery.mobile.slider.js"); | ||
echo "\n"; | ||
|
||
echo "\n"; | ||
|
||
compile("widgets/widget.js"); | ||
echo "\n"; | ||
compile("widgets/animation.js"); | ||
echo "\n"; | ||
|
||
echo "\n"; | ||
|
||
compile("designs/cube.js"); | ||
echo "\n"; | ||
compile("designs/greenhornet.js"); | ||
echo "\n"; | ||
compile("designs/ice.js"); | ||
echo "\n"; | ||
compile("designs/night.js"); | ||
echo "\n"; | ||
compile("designs/sand.js"); | ||
echo "\n"; | ||
|
||
echo "\n"; | ||
|
||
compile("driver/io_domotiga.js"); | ||
echo "\n"; | ||
compile("driver/io_eibd.js"); | ||
echo "\n"; | ||
compile("driver/io_json.js"); | ||
echo "\n"; | ||
compile("driver/io_linknx.js"); | ||
echo "\n"; | ||
compile("driver/io_offline.js"); | ||
echo "\n"; | ||
compile("driver/io_smarthome.py.js"); | ||
echo "\n"; | ||
|
||
|
||
echo "\n"; | ||
echo str_repeat("-", 80)."\n\n"; | ||
echo "\n</pre>"; | ||
|
||
|
||
function compile($file) | ||
{ | ||
echo "<b>".$file."</b>\n"; | ||
|
||
if (is_file($file)) | ||
{ | ||
// compile it | ||
$c = new smartClosure(); | ||
$result = $c->add($file)->simpleMode()->_compile(); | ||
|
||
// write it | ||
$compiled = substr($result, strpos($result, '*/') + 3); | ||
$compiled = "/* smartVISU, Martin Gleiß, 2013, GPL [http://www.gnu.de] */\n".$compiled; | ||
filewrite(substr($file, 0, -3).".min.js", $compiled); | ||
|
||
// status | ||
$pos = strpos($result, '\'') + 1; | ||
echo str_replace(" Size", "", str_replace("\\n", ", ", substr($result, $pos + 50, strpos($result, ');') - $pos - 1 - 104))); | ||
echo "\n"; | ||
} | ||
else | ||
echo "...not found!\n"; | ||
} | ||
|
||
?> |
Oops, something went wrong.