-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRoboFile.php
More file actions
62 lines (54 loc) · 1.53 KB
/
Copy pathRoboFile.php
File metadata and controls
62 lines (54 loc) · 1.53 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
51
52
53
54
55
56
57
58
59
60
61
62
<?php
/**
* Build script using the Robo task runner.
*
* @see http://robo.li/
*/
use Symfony\Component\Filesystem\Filesystem;
class RoboFile extends \Robo\Tasks
{
private function createPaths($paths){
// iterate through paths array and create folder
foreach ($paths as $path) {
// use Symfony 2 mkdir for recursive directory creation
if (! is_dir($path)) {
$this->_mkdir($path);
}
}
}
/**
* Main build step, included to be compatible with Sage gulp
*/
public function build() {
// check the build folder
$buildDirs = array(
'dist/styles',
'dist/scripts',
'dist/fonts',
'dist/images'
);
// $this->createPaths($buildDirs);
$this->styles();
$this->scripts();
$this->fonts();
}
public function styles() {
// Copy xterm.js styles to css
$this->_copy('vendor/bower-asset/xterm.js/dist/xterm.css', 'css/vendor/xterm.js/xterm.css', true);
}
public function scripts() {
// Copy xterm.js scripts to js
$this->_copy('vendor/bower-asset/xterm.js/dist/xterm.js', 'js/vendor/xterm.js/xterm.js', true);
$this->_copyDir('vendor/bower-asset/xterm.js/dist/addons/fit', 'js/vendor/xterm.js/addons/fit', true);
}
public function fonts() {
// Copy Droid Sans Slashed
$this->_copy(
'vendor/bower-asset/powerline-fonts/DroidSansMonoSlashed/Droid Sans Mono Slashed for Powerline.ttf',
'fonts/DroidSansMonoSlashed.ttf'
);
$this->taskExec('sfnt2woff')
->arg('fonts/DroidSansMonoSlashed.ttf')
->run();
}
}