Commit 6a883d52bc62800999f7525ccc78bd79a0593dfc

Authored by Eric Fernandez
1 parent c258008025
Exists in master and in 1 other branch develop

quito inyeccion

Showing 2 changed files with 1 additions and 2 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: 'focaModalDetalleCisternas', 26 module: 'focaModalDetalleCisternas',
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-modal-detalle-cisternas.js'), 41 concat('foca-modal-detalle-cisternas.js'),
42 replace('src/views/', ''), 42 replace('src/views/', ''),
43 gulp.dest(paths.tmp), 43 gulp.dest(paths.tmp),
44 rename('foca-modal-detalle-cisternas.min.js'), 44 rename('foca-modal-detalle-cisternas.min.js'),
45 uglify(), 45 uglify(),
46 replace('"ui.bootstrap"', ''),
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('focaModalDetalleCisternas', ['ui.bootstrap']); 1 angular.module('focaModalDetalleCisternas', []);
2 2