-
Notifications
You must be signed in to change notification settings - Fork 14
/
RoboFile.php
26 lines (26 loc) · 781 Bytes
/
RoboFile.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
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
public function assetsWatch()
{
$this->taskWatch()
->monitor('assets', function () {
$this->assetsBuild();
})->run();
}
public function assetsBuild($opts = ['clear' => false])
{
$this->say(date('H:i:s').": starting rebuild");
if ($opts['clear']) {
$this->say(date('H:i:s').": Clearing old files!");
$this->_exec('vendor/bin/mini_asset clear --config assets/assets.ini');
}
$this->_exec('vendor/bin/mini_asset build --config assets/assets.ini');
$this->say(date('H:i:s').": rebuild done!");
}
}