diff --git a/RoboFile.php b/RoboFile.php index 93e74ce..2f30ef0 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -1,5 +1,7 @@ makeCss(); $this->makeJs(); + $this->makeMustache(); } /** @@ -57,4 +60,20 @@ class RoboFile extends \Robo\Tasks { $this->taskMinify( 'js/laps.js' ) ->run(); } + + /** + * Compiles plugin's mustache template + */ + public function makeMustache() { + $dir = __DIR__ . '/views/cache'; + $this->_cleanDir( $dir ); + + $mustache = new \Mustache_Engine( + array( + 'loader' => new \Mustache_Loader_FilesystemLoader( __DIR__ . '/views' ), + 'cache' => $dir, + ) + ); + $mustache->loadTemplate( 'laps' ); + } } \ No newline at end of file