From 80c8a48cb27eca7537ef47d42e2405a6478c7ebe Mon Sep 17 00:00:00 2001 From: Eric Fernandez Date: Thu, 11 Oct 2018 14:41:26 -0300 Subject: [PATCH] agrego instancia de gulp-replace agrego tareas para elminar archivos postinstall --- gulpfile.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 72e8245..e0c7750 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,6 +7,7 @@ const uglify = require('gulp-uglify-es').default; const gulp = require('gulp'); const pump = require('pump'); const jshint = require('gulp-jshint'); +const replace = require('gulp-replace'); var paths = { srcJS: 'src/js/*.js', @@ -37,6 +38,8 @@ gulp.task('uglify', ['templates'], function() { 'tmp/views.js' ]), concat('foca-abm-precios-condiciones.js'), + replace('src/views/', ''), + replace("['ngRoute', 'ui.bootstrap']", '[]'), gulp.dest(paths.tmp), rename('foca-abm-precios-condiciones.min.js'), uglify(), @@ -45,7 +48,7 @@ gulp.task('uglify', ['templates'], function() { ); }); -gulp.task('clean', function(){ +gulp.task('clean', function() { return gulp.src(['tmp', 'dist'], {read: false}) .pipe(clean()); }); @@ -60,3 +63,17 @@ gulp.task('pre-commit', function() { ] ); }); + +gulp.task('clean-post-install', function(){ + return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', + 'index.html'], {read: false}) + .pipe(clean()); +}); + +gulp.task('webserver', function() { + pump [ + connect.server({port: 3000}) + ] +}); + +gulp.task('default', ['webserver']); -- 1.9.1