Commit f2a2f7356820817e873c22b6f5de4b6372be33ae
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request !57
Showing
1 changed file
Show diff stats
gulpfile.js
... | ... | @@ -9,6 +9,8 @@ const pump = require('pump'); |
9 | 9 | const jshint = require('gulp-jshint'); |
10 | 10 | const replace = require('gulp-replace'); |
11 | 11 | const connect = require('gulp-connect'); |
12 | +const header = require('gulp-header'); | |
13 | +const footer = require('gulp-footer'); | |
12 | 14 | |
13 | 15 | var paths = { |
14 | 16 | srcJS: 'src/js/*.js', |
... | ... | @@ -32,7 +34,7 @@ gulp.task('templates', ['clean'], function() { |
32 | 34 | ); |
33 | 35 | }); |
34 | 36 | |
35 | -gulp.task('uglify', ['templates'], function() { | |
37 | +gulp.task('uglify', ['templates', 'uglify-spec'], function() { | |
36 | 38 | return pump( |
37 | 39 | [ |
38 | 40 | gulp.src([ |
... | ... | @@ -50,6 +52,17 @@ gulp.task('uglify', ['templates'], function() { |
50 | 52 | ); |
51 | 53 | }); |
52 | 54 | |
55 | +gulp.task('uglify-spec', function() { | |
56 | + return pump([ | |
57 | + gulp.src(paths.specs), | |
58 | + concat('foca-crear-cobranza.spec.js'), | |
59 | + replace("src/views/", ''), | |
60 | + header("describe('Módulo foca-crear-cobranza', function() { \n"), | |
61 | + footer("});"), | |
62 | + gulp.dest(paths.dist) | |
63 | + ]); | |
64 | +}); | |
65 | + | |
53 | 66 | gulp.task('clean', function() { |
54 | 67 | return gulp.src(['tmp', 'dist'], {read: false}) |
55 | 68 | .pipe(clean()); |
... | ... | @@ -76,7 +89,7 @@ gulp.task('webserver', function() { |
76 | 89 | |
77 | 90 | gulp.task('clean-post-install', function() { |
78 | 91 | return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', |
79 | - 'index.html'], {read: false}) | |
92 | + 'index.html', 'test.html', 'spec'], {read: false}) | |
80 | 93 | .pipe(clean()); |
81 | 94 | }); |
82 | 95 |