{"size": 1575, "ext": "js", "max_stars_repo_path": "Gulpfile.js", "max_stars_repo_name": "sani005/gulpworkflow", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Gulpfile.js", "max_issues_repo_name": "sani005/gulpworkflow", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Gulpfile.js", "max_forks_repo_name": "sani005/gulpworkflow", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.875, "max_line_length": 94, "alphanum_fraction": 0.5352380952}
﻿// Include Gulp and all required plugins
var gulp = require('gulp');
var requireDir = require('require-dir');
requireDir('./gulp-tasks');
/**
 * To reload page on file change 
 */
var browserSync = require('browser-sync').create();

/**
 * Clean Task  */

gulp.task('clean', function() {
    del(['dist/assets/styles', 'dist/assets/scripts', 'dist/assets/images']);
});



gulp.task('serve', function () {
    browserSync.init({
        server: {
            baseDir: "./"
        },
        port: 8081,
        /**
         * Open site in multiple browsers
         */
        browser: [
            /** Error - Not opening chrome **/
                "google chrome"

        ],
        /**
         * Clicks, Scrolls & Form inputs on any device will be mirrored to all others.
         */
        ghostMode: {
            clicks: true,
            forms: true,
            scroll: true
        }
    });
    gulp.watch(['dist/**']).on('change', browserSync.reload);
    gulp.watch(['*.html', 'src/scripts/jshint-output.html']).on('change', browserSync.reload);

});

gulp.task('default', ['styles', 'scripts', 'images', 'serve'], function () {
    // Watch less files
    gulp.watch('src/styles/**/*.less', ['styles']);

    // Watch .js files
    gulp.watch('src/scripts/**/*.js', ['scripts']);

    // Watch image files
    gulp.watch('src/images/**/*.{png,jpg,gif}', ['images']);

});

/**
 *  Static Server - Testing Purpose
 */


/**
 * Dynamic Server

gulp.task('browser-sync', function() {
    browserSync.init({
        proxy: "http://icisnglocal/"
    });
});
 */