-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
49 lines (38 loc) · 1.02 KB
/
gulpfile.js
File metadata and controls
49 lines (38 loc) · 1.02 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
'use strict';
var gulp = require('gulp');
var project = require('./project.conf.js');
var path = project.path;
require('require-dir')('./gulp');
var del = require('del');
var spawn = require('child_process').spawn;
var gutil = require('gulp-util');
gulp.task('default', ['develop']);
gulp.task('pristine', ['clean'], function( done ){
del([
path.bower + '**',
'node_modules/**'
], function(){
var git = spawn('git', ['clean', '-d', '-fx', '-e', '*.local.json']);
var stdout='';
var stderr='';
git.stdout.setEncoding('utf8');
git.stdout.on('data', function (data) {
stdout += data;
gutil.log(data);
});
git.stderr.setEncoding('utf8');
git.stderr.on('data', function (data) {
stderr += data;
gutil.log(gutil.colors.red(data));
gutil.beep();
});
git.on('close', function(code) {
gutil.log('Done with exit code', code);
done();
});
});
});
gulp.task( 'show:config', function(){
console.log( JSON.stringify( project, null, 2 ) );
});
gulp.task( 'postinstall', ['webdriver-update'] );