forked from mymusicstats/mymusicstats.github.io
-
Notifications
You must be signed in to change notification settings - Fork 13
/
gulpfile.js
executable file
·38 lines (32 loc) · 916 Bytes
/
gulpfile.js
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
// Include gulp
var gulp = require('gulp');
// Include Our Plugins
var jshint = require('gulp-jshint');
var uglify = require('gulp-uglify');
var protractor = require("gulp-protractor").protractor;
// Lint Task
gulp.task('lint', function() {
return gulp.src(['scrobble.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// Minify JS
gulp.task('minify', function() {
return gulp.src(['scrobble.js'])
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
});
// Watch Files For Changes
gulp.task('watch', function() {
gulp.watch('*.js', ['lint', 'minify']);
});
// Protractor Task
gulp.task('protractor', function (done) {
gulp.src(__dirname + './tests/')
.pipe(protractor({
configFile: './tests/conf.js',
}))
.on('error', function (e) { throw e })
});
// Default Task
gulp.task('default', ['lint', 'minify', 'watch']);