Created
February 6, 2014 23:31
-
-
Save stefanbuck/8854706 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
var gulp = require('gulp'); | |
var jshint = require('gulp-jshint'); | |
var jscs = require('gulp-jscs'); | |
var mocha = require('gulp-mocha'); | |
var bump = require('gulp-bump'); | |
var paths = { | |
lint: ['./gulpfile.js', './src/*.js'], | |
tests: './test/**/*.js', | |
}; | |
gulp.task('lint', function () { | |
return gulp.src(paths.lint) | |
.pipe(jshint('.jshintrc')) | |
.pipe(jscs()) | |
.pipe(jshint.reporter('jshint-stylish')); | |
}); | |
gulp.task('mocha', function () { | |
gulp.src(paths.tests) | |
.pipe(mocha({ reporter: 'list' })); | |
}); | |
gulp.task('bump', ['test'], function () { | |
var bumpType = process.env.BUMP || 'patch'; // major.minor.patch | |
return gulp.src(['./package.json']) | |
.pipe(bump({ type: bumpType })) | |
.pipe(gulp.dest('./')); | |
}); | |
gulp.task('test', ['lint', 'mocha']); | |
gulp.task('release', ['bump']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment