forked from DennisBecker/bataillon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoboFile.php
41 lines (34 loc) · 960 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
public function watch() {
$this->build();
$this->taskServer(8000)
->dir('dist')
->background()
->run();
$this->taskOpenBrowser('http://localhost:8000')
->run();
$this->taskWatch()
->monitor('composer.json', function() {
$this->taskComposerUpdate()->run();
})->monitor('src', function() {
$this->build();
})->run();
}
public function build() {
$this->_cleanDir('./dist');
$this->taskExec('php bataillon.php build')->run();
}
public function cleanup() {
$this->taskExec('php bataillon.php cleanup')->run();
}
public function update() {
$this->taskExec('php bataillon.php update')->run();
}
}