Smart Home Sensor Visualization Project
NEW: Try first-time-setup.sh. The following explains what that
script does.
We're using the Composer dependency manager to automatically track PHP library dependencies (for example, PHPUnit, Twig, plus any other PHP libraries we may want). The link given should give you enough information for how to setup Composer on your machine. Essentially, it's just:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composerThen in www/ simply:
composer install --devTo install all dependencies.
JavaScript modules are cloned into www/js/ using git-submodules.
The first time you pull, you must use:
git submodule init
git submodule update...to get the latest versions of all submodules. When somebody changes
the submodule version (you can check this using git submodule status),
you can update again using:
git submodule updateFor now, I'm just dumping them all in the test/ directory. Check out
DummyTest.php to give you the template for all of your unit tests.
Essentially, just include define a subclass of
PHPUnit_Framework_TestCase. To run it, you need the phpunit
exeucturable somewhere in your path. Then, you can simply run the test
in the command line (e.g., phpunit tests/DummyTest.php).
We can use r.js to optimize the ENTIRE web site -- basically, it merges and minifies a bunch of JavaScript and CSS.
This would recreate the www/ directory into a build/ directory.
It's kind of crazy, and I wouldn't recommend trying it right now, but it's all set up and pretty nifty.
Simply do this in the root repository directory:
r.js -o www/js/app.build.jsAnd a clone of the www/ directory will be made called build/
that will contain all of the uglified JavaScript and CSS sources.
Using the EvalMath PHP class by Miles Kaufmann.