-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6e6ced
commit 24f5b43
Showing
23 changed files
with
5,840 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* jshint node:true */ | ||
'use strict' | ||
|
||
var gulp = require('gulp'); | ||
var child = require('child_process'); | ||
var gutil = require('gulp-util'); | ||
var Q = require('q'); | ||
|
||
gulp.task('develop:build', function(callback) | ||
{ | ||
var deferred = Q.defer(); | ||
gutil.log(gutil.colors.blue('Copying "linked" libraries')); | ||
gulp.src('lib/*.plg') | ||
.pipe(gulp.dest('build/')); | ||
|
||
var build = child.exec('buildPlg', function(err, stdout, stderr) | ||
{ | ||
if (err) | ||
{ | ||
gutil.log(gutil.colors.red("Build failed with error code: " + err.code)); | ||
} | ||
gutil.log(gutil.colors.blue('Output: ') + '\n' + stdout); | ||
}); | ||
|
||
var buildTest = child.exec('buildPlg test', function(err, stdout, stderr) | ||
{ | ||
if (err) | ||
{ | ||
gutil.log(gutil.colors.red("Test Build failed with error code: " + err.code)); | ||
} | ||
gutil.log(gutil.colors.blue('Output: ') + '\n' + stdout); | ||
deferred.resolve(); | ||
}); | ||
|
||
return deferred.promise; | ||
}); | ||
|
||
gulp.task('develop:deploy', ['develop:build'], function() | ||
{ | ||
var deploy = child.exec('deployPlg', function(err, stdout, stderr) | ||
{ | ||
if (err) | ||
{ | ||
gutil.log(gutil.colors.red("Deploy failed with error code: " + err.code)); | ||
} | ||
gutil.log(gutil.colors.blue('Output: ') + '\n' + stdout); | ||
}); | ||
}); | ||
|
||
gulp.task('develop', function() | ||
{ | ||
gulp.watch(['src/**/*', 'test/**/*', 'lib/**/*.plg'], ['develop:build', 'develop:deploy']) | ||
}); | ||
|
||
gulp.task('default', function() | ||
{ | ||
gulp.start('develop') | ||
}); |
Oops, something went wrong.