//watch ve scripts taskları açılışta çalışmasını sağlıyoruz.
gulp.task('default', ['watch', 'scripts']);
// watch fonksiyonu ile elle değişen dosyaları takip ediyor ve işlemleri tekrar yapıyor.
gulp.task('watch', function() {
gulp.watch('../source/*.js', ['scripts']);
});
gulp.task('scripts', function() {
return gulp.src('../source/*.js')
.pipe(concat('all.js'))
.pipe(gulp.dest('dist'))
.pipe(rename('all.min.js'))
.pipe(uglify())
.pipe(gulp.dest('dist/js'));
});