Skip to content

Commit

Permalink
LF, and some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Jan 25, 2015
1 parent 4d171f5 commit 2b58f87
Show file tree
Hide file tree
Showing 35 changed files with 3,242 additions and 3,234 deletions.
1,348 changes: 674 additions & 674 deletions license.txt

Large diffs are not rendered by default.

184 changes: 92 additions & 92 deletions make.php
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";
}

?>
Loading

0 comments on commit 2b58f87

Please sign in to comment.