Commit b25becceee04ab73c5e38a91046ae7b92ac972f9

Authored by Eric Fernandez
1 parent 6d022c98da
Exists in master

quito todas las inyecciones

Showing 2 changed files with 1 additions and 20 deletions   Show diff stats
1 const templateCache = require('gulp-angular-templatecache'); 1 const templateCache = require('gulp-angular-templatecache');
2 const clean = require('gulp-clean'); 2 const clean = require('gulp-clean');
3 const concat = require('gulp-concat'); 3 const concat = require('gulp-concat');
4 const htmlmin = require('gulp-htmlmin'); 4 const htmlmin = require('gulp-htmlmin');
5 const rename = require('gulp-rename'); 5 const rename = require('gulp-rename');
6 const uglify = require('gulp-uglify'); 6 const uglify = require('gulp-uglify');
7 const gulp = require('gulp'); 7 const gulp = require('gulp');
8 const pump = require('pump'); 8 const pump = require('pump');
9 const jshint = require('gulp-jshint'); 9 const jshint = require('gulp-jshint');
10 const replace = require('gulp-replace'); 10 const replace = require('gulp-replace');
11 const connect = require('gulp-connect'); 11 const connect = require('gulp-connect');
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', ['clean'], function() { 20 gulp.task('templates', ['clean'], function() {
21 return 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: 'focaCrearHojaRuta', 26 module: 'focaCrearHojaRuta',
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 return 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-crear-hoja-ruta.js'), 41 concat('foca-crear-hoja-ruta.js'),
42 replace('src/views/', ''), 42 replace('src/views/', ''),
43 replace("'ngRoute','focaModalRemito','ui.bootstrap','focaBotoneraLateral'", ''),
44 gulp.dest(paths.tmp), 43 gulp.dest(paths.tmp),
45 rename('foca-crear-hoja-ruta.min.js'), 44 rename('foca-crear-hoja-ruta.min.js'),
46 uglify(), 45 uglify(),
47 gulp.dest(paths.dist) 46 gulp.dest(paths.dist)
48 ] 47 ]
49 ); 48 );
50 }); 49 });
51 50
52 gulp.task('clean', function() { 51 gulp.task('clean', function() {
53 return gulp.src(['tmp', 'dist'], {read: false}) 52 return gulp.src(['tmp', 'dist'], {read: false})
54 .pipe(clean()); 53 .pipe(clean());
55 }); 54 });
56 55
57 gulp.task('pre-commit', function() { 56 gulp.task('pre-commit', function() {
58 return pump( 57 return pump(
59 [ 58 [
60 gulp.src(paths.srcJS), 59 gulp.src(paths.srcJS),
61 jshint('.jshintrc'), 60 jshint('.jshintrc'),
62 jshint.reporter('default'), 61 jshint.reporter('default'),
63 jshint.reporter('fail') 62 jshint.reporter('fail')
64 ] 63 ]
65 ); 64 );
66 65
67 gulp.start('uglify'); 66 gulp.start('uglify');
68 }); 67 });
69 68
70 gulp.task('webserver', function() { 69 gulp.task('webserver', function() {
71 pump [ 70 pump [
72 connect.server({port: 3300, host: '0.0.0.0'}) 71 connect.server({port: 3300, host: '0.0.0.0'})
73 ] 72 ]
74 }); 73 });
75 74
76 gulp.task('clean-post-install', function() { 75 gulp.task('clean-post-install', function() {
77 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', 76 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
78 'index.html'], {read: false}) 77 'index.html'], {read: false})
79 .pipe(clean()); 78 .pipe(clean());
80 }); 79 });
81 80
82 gulp.task('default', ['webserver']); 81 gulp.task('default', ['webserver']);
83 82
84 gulp.task('watch', function() { 83 gulp.task('watch', function() {
85 gulp.watch([paths.srcJS, paths.srcViews], ['uglify']); 84 gulp.watch([paths.srcJS, paths.srcViews], ['uglify']);
86 }); 85 });
87 86
1 angular.module('focaCrearHojaRuta', [ 1 angular.module('focaCrearHojaRuta', []);
2 'ngRoute',
3 'focaModalRemito',
4 'ui.bootstrap',
5 'focaBotoneraLateral',
6 /*'focaBusquedaProductos',
7 'focaModalProveedor',
8 'focaBusquedaCliente',
9 'focaModalPrecioCondicion',
10 'focaModalFlete',
11 'focaDirectivas',
12 'focaModal',
13 'focaModalDomicilio',
14 'focaModalMoneda',
15 'focaModalCotizacion',
16 'focaSeguimiento',
17 'angular-ladda',
18 'cordovaGeolocationModule'*/
19 ]);
20 2