Created
July 1, 2015 15:07
-
-
Save niorad/5823d63b22f157650258 to your computer and use it in GitHub Desktop.
Gulp–Recipe for watching and concatenating JS-Files plus server
This file contains hidden or 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
var gulp = require('gulp'); | |
var concat = require('gulp-concat'); | |
var connect = require('gulp-connect'); | |
gulp.task('js', function() { | |
gulp.src(['src/**/*.js']) | |
.pipe(concat('app.js')) | |
.pipe(gulp.dest('.')) | |
.pipe(connect.reload()) | |
}); | |
gulp.task('connect', function() { | |
connect.server(); | |
}); | |
gulp.task('default', ['js', 'connect'], function() { | |
gulp.watch('src/**/*.js', ['js']) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment