Skip to content

Commit

Permalink
Bring over changes from degen
Browse files Browse the repository at this point in the history
  • Loading branch information
vantreeseba committed Apr 19, 2015
1 parent 7666fbd commit ebd9592
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 39 deletions.
43 changes: 14 additions & 29 deletions slush/default/templates/Gulpfile.js
Expand Up @@ -3,38 +3,23 @@ var gulp = require('gulp');
var shell = require('gulp-shell');
var mkdirp = require('mkdirp');

var watching = false;

gulp.on('err', function errHandler(err) {
process.emit('exit', err.err);
});

process.on('exit', function(err) {
process.nextTick(function() {
if(!watching){
process.exit(err.code);
}
});
});

gulp.task('create-artifacts-dir', function() {
function createArtifactDirs() {
mkdirp('artifacts/js');
mkdirp('artifacts/test');
});

gulp.task('build-js', shell.task('haxe targets/js.hxml'));
}

gulp.task('build', ['create-artifacts-dir', 'build-js']);
function watch() {
var watchDirs = ['src/**/*.hx', 'test/**/*.hx', 'targets/**'];
gulp.watch(watchDirs, ['test']);
}

gulp.task('test', function() {
return gulp
.src('')
.pipe(shell('haxelib run munit test -result-exit-code'));
});
gulp.task('create-artifacts-dir', createArtifactDirs);
gulp.task('build-js', shell.task('haxe targets/js.hxml'));
gulp.task('test', shell.task('haxelib run munit test -result-exit-code'));
gulp.task('test-coverage', shell.task('haxelib run munit test -coverage -result-exit-code'));

gulp.task('test-coverage', shell.task('haxelib run munit test -coverage'));
gulp.task('watch', watch);

gulp.task('watch', function() {
watching = true;
gulp.watch(['src/**/*.hx', 'test/**/*.hx', 'targets/**'], ['test']);
});
gulp.task('build', ['create-artifacts-dir', 'build-js']);
gulp.task('ci', ['test-coverage', 'build']);
gulp.task('default', ['ci']);
11 changes: 1 addition & 10 deletions slush/default/templates/_travis.yml
@@ -1,21 +1,12 @@
language: haxe
cache:
apt: true
directories:
- node_modules

before_install:
- npm install
- yes | haxelib install targets/test.hxml

install: true

before_script:
- gulp create-artifacts-dir
- gulp test

hxml:
- targets/js.hxml
script: gulp

#whitelist only the master branch
branches:
Expand Down

0 comments on commit ebd9592

Please sign in to comment.