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