UNPKG

angular-masterrow

Version:

The plugin necessary to use MasterRow tool in AngularJS.

46 lines (35 loc) 1.08 kB
var gulp = require('gulp'); var browserSync = require ('browser-sync').create(); var plumber = require('gulp-plumber'); var concat = require('gulp-concat'); var uglyfly = require('gulp-uglyfly'); // Process the JS files to dist gulp.task('jsProcess', function (){ return gulp.src('src/*.js') .pipe(plumber()) .pipe(concat('angular-masterrow.js')) .pipe(gulp.dest('dist/')) .pipe(browserSync.stream()) }); // Same process above, but minify gulp.task('jsMinifyProcess', function (){ return gulp.src('src/*.js') .pipe(plumber()) .pipe(concat('angular-masterrow.min.js')) .pipe(uglyfly()) .pipe(gulp.dest('dist/')) .pipe(browserSync.stream()) }); // The browser refresh automatization gulp.task('browser-sync', function(){ browserSync.init({ proxy: "localhost/Outros/Angular-MasterRow/test/test.html", notify: false }); }); // Watchers gulp.task ('watch', function(){ gulp.watch(['src/*.js', 'test/*.*'], ['jsProcess', 'jsMinifyProcess']); }); // The task groups gulp.task( 'default', ['jsProcess', 'jsMinifyProcess', 'browser-sync', 'watch']);