From 7137e902e3b7acf3c5d018dfea49fea91488fc24 Mon Sep 17 00:00:00 2001 From: Pablo Marco del Pont Date: Mon, 29 Oct 2018 16:35:30 -0300 Subject: [PATCH] - Refactor de modal petroleras a modal proveedor. - Agregue tasks clean y watch al gulp. --- README.md | 4 +- gulpfile.js | 19 +++++++--- index.html | 10 ++--- package.json | 12 +++--- src/etc/develop.js.ejemplo | 2 +- src/js/app.js | 2 +- src/js/controller.js | 46 +++++++++++------------ src/js/service.js | 8 ++-- src/views/modal-petroleras.html | 81 ----------------------------------------- src/views/modal-proveedor.html | 81 +++++++++++++++++++++++++++++++++++++++++ 10 files changed, 137 insertions(+), 128 deletions(-) delete mode 100644 src/views/modal-petroleras.html create mode 100644 src/views/modal-proveedor.html diff --git a/README.md b/README.md index 6281f11..c47b38e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# foca-modal-petroleras +# foca-modal-proveedor -Modal para listar petroleras \ No newline at end of file +Modal para listar proveedores diff --git a/gulpfile.js b/gulpfile.js index 560d7bd..0bb4968 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,14 +17,19 @@ var paths = { dist: 'dist/' }; -gulp.task('templates', function() { +gulp.task('clean', function() { + return gulp.src(['tmp', 'dist'], {read: false}) + .pipe(clean()); +}); + +gulp.task('templates', ['clean'], function() { return pump( [ gulp.src(paths.srcViews), replace('views/', ''), htmlmin(), templateCache('views.js', { - module: 'focaModalPetroleras', + module: 'focaModalProveedor', root: '' }), gulp.dest(paths.tmp) @@ -39,11 +44,11 @@ gulp.task('uglify', ['templates'], function() { paths.srcJS, 'tmp/views.js' ]), - concat('foca-modal-petroleras.js'), + concat('foca-modal-proveedor.js'), replace('src/views/', ''), replace("['ui.bootstrap', 'focaDirectivas']", '[]'), gulp.dest(paths.tmp), - rename('foca-modal-petroleras.min.js'), + rename('foca-modal-proveedor.min.js'), uglify(), gulp.dest(paths.dist) ] @@ -75,4 +80,8 @@ gulp.task('clean-post-install', function() { .pipe(clean()); }); -gulp.task('default', ['webserver']); \ No newline at end of file +gulp.task('default', ['webserver']); + +gulp.task('watch', function() { + gulp.watch([paths.srcJS, paths.srcViews], ['uglify']) +}); diff --git a/index.html b/index.html index fc235e3..a93547b 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -26,16 +26,16 @@