Commit 9e0de2f580b92a0d67d77828ec0bcad797fdfda4

Authored by Eric Fernandez
1 parent f5ccee355e
Exists in master

agrego sentencia return a las tareas para devolver la promesa cumplida

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
1 const templateCache = require('gulp-angular-templatecache'); 1 const templateCache = require('gulp-angular-templatecache');
2 const concat = require('gulp-concat'); 2 const concat = require('gulp-concat');
3 const htmlmin = require('gulp-htmlmin'); 3 const htmlmin = require('gulp-htmlmin');
4 const rename = require('gulp-rename'); 4 const rename = require('gulp-rename');
5 const uglify = require('gulp-uglify-es').default; 5 const uglify = require('gulp-uglify-es').default;
6 const gulp = require('gulp'); 6 const gulp = require('gulp');
7 const pump = require('pump'); 7 const pump = require('pump');
8 const jshint = require('gulp-jshint'); 8 const jshint = require('gulp-jshint');
9 const replace = require('gulp-replace'); 9 const replace = require('gulp-replace');
10 const connect = require('gulp-connect'); 10 const connect = require('gulp-connect');
11 const clean = require('gulp-clean'); 11 const clean = require('gulp-clean');
12 12
13 var paths = { 13 var paths = {
14 srcJS: 'src/js/*.js', 14 srcJS: 'src/js/*.js',
15 srcViews: 'src/views/*.html', 15 srcViews: 'src/views/*.html',
16 tmp: 'tmp', 16 tmp: 'tmp',
17 dist: 'dist/' 17 dist: 'dist/'
18 }; 18 };
19 19
20 gulp.task('templates', function() { 20 gulp.task('templates', function() {
21 pump( 21 return pump(
22 [ 22 [
23 gulp.src(paths.srcViews), 23 gulp.src(paths.srcViews),
24 htmlmin(), 24 htmlmin(),
25 templateCache('views.js', { 25 templateCache('views.js', {
26 module: 'focaBusquedaCliente', 26 module: 'focaBusquedaCliente',
27 root: '' 27 root: ''
28 }), 28 }),
29 gulp.dest(paths.tmp) 29 gulp.dest(paths.tmp)
30 ] 30 ]
31 ); 31 );
32 }); 32 });
33 33
34 gulp.task('uglify', ['templates'], function() { 34 gulp.task('uglify', ['templates'], function() {
35 pump( 35 return pump(
36 [ 36 [
37 gulp.src([ 37 gulp.src([
38 paths.srcJS, 38 paths.srcJS,
39 'tmp/views.js' 39 'tmp/views.js'
40 ]), 40 ]),
41 concat('foca-busqueda-cliente.js'), 41 concat('foca-busqueda-cliente.js'),
42 replace("'ui.bootstrap'", ''), 42 replace("'ui.bootstrap'", ''),
43 replace('src/views/', ''), 43 replace('src/views/', ''),
44 gulp.dest(paths.tmp), 44 gulp.dest(paths.tmp),
45 rename('foca-busqueda-cliente.min.js'), 45 rename('foca-busqueda-cliente.min.js'),
46 uglify(), 46 uglify(),
47 gulp.dest(paths.dist) 47 gulp.dest(paths.dist)
48 ] 48 ]
49 ); 49 );
50 }); 50 });
51 51
52 gulp.task('pre-commit', function() { 52 gulp.task('pre-commit', function() {
53 pump( 53 return pump(
54 [ 54 [
55 gulp.src(paths.srcJS), 55 gulp.src(paths.srcJS),
56 jshint('.jshintrc'), 56 jshint('.jshintrc'),
57 jshint.reporter('default'), 57 jshint.reporter('default'),
58 jshint.reporter('fail') 58 jshint.reporter('fail')
59 ] 59 ]
60 ); 60 );
61 }); 61 });
62 62
63 63
64 gulp.task('webserver', function() { 64 gulp.task('webserver', function() {
65 pump [ 65 pump [
66 connect.server({port: 3000}) 66 connect.server({port: 3000})
67 ] 67 ]
68 }); 68 });
69 69
70 gulp.task('clean-post-install', function() { 70 gulp.task('clean-post-install', function() {
71 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', 71 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
72 'index.html'], {read: false}) 72 'index.html'], {read: false})
73 .pipe(clean()); 73 .pipe(clean());
74 }); 74 });
75 75
76 gulp.task('default', ['webserver']); 76 gulp.task('default', ['webserver']);
77 77