Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
agragregra committed Dec 11, 2018
1 parent bca73c8 commit 9be4c35
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var gulp = require('gulp'),
cleancss = require('gulp-clean-css'),
rename = require('gulp-rename'),
autoprefixer = require('gulp-autoprefixer'),
notify = require("gulp-notify"),
notify = require('gulp-notify'),
rsync = require('gulp-rsync');

gulp.task('browser-sync', function() {
Expand All @@ -34,7 +34,7 @@ gulp.task('styles', function() {
.pipe(browserSync.stream())
});

gulp.task('js', function() {
gulp.task('scripts', function() {
return gulp.src([
'app/libs/jquery/dist/jquery.min.js',
'app/js/common.js', // Always at the end
Expand All @@ -45,6 +45,11 @@ gulp.task('js', function() {
.pipe(browserSync.reload({ stream: true }))
});

gulp.task('code', function() {
return gulp.src('app/*.html')
.pipe(browserSync.reload({ stream: true }))
});

gulp.task('rsync', function() {
return gulp.src('app/**')
.pipe(rsync({
Expand All @@ -60,10 +65,10 @@ gulp.task('rsync', function() {
}))
});

gulp.task('watch', ['styles', 'js', 'browser-sync'], function() {
gulp.task('watch', ['styles', 'scripts', 'browser-sync'], function() {
gulp.watch('app/'+syntax+'/**/*.'+syntax+'', ['styles']);
gulp.watch(['libs/**/*.js', 'app/js/common.js'], ['js']);
gulp.watch('app/*.html', browserSync.reload)
gulp.watch(['libs/**/*.js', 'app/js/common.js'], ['scripts']);
gulp.watch('app/*.html', ['code'])
});

gulp.task('default', ['watch']);

0 comments on commit 9be4c35

Please sign in to comment.