forked from MichaelThessel/pwx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoboFile.php
More file actions
51 lines (47 loc) · 1.16 KB
/
RoboFile.php
File metadata and controls
51 lines (47 loc) · 1.16 KB
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
42
43
44
45
46
47
48
49
50
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
/**
* Build PWX
*/
public function build()
{
// Minify JS
$this->taskMinify('web/js/script.js')
->run();
// Minify CSS
$this->taskMinify('web/css/style.css')
->run();
// Concat JS
$this->taskConcat(array(
'web/js/jquery.min.js',
'web/js/bootstrap.min.js',
'web/js/jquery.countdown.min.js',
'web/js/jquery.zclip.min.js',
'web/js/js.cookie.min.js',
'web/js/hideShowPassword.min.js',
'web/js/script.min.js',
))
->to('web/js/scripts.min.js')
->run();
}
/**
* Watch CSS and JS assets for changes and compile minfied assets on change
*/
public function watch()
{
$this->taskWatch()
->monitor(
array('web/js/script.js', 'web/css/style.css'),
function() {
$this->build();
}
)
->run();
}
}