Commit 80c8a48cb27eca7537ef47d42e2405a6478c7ebe
1 parent
e064fbb6cc
Exists in
master
agrego instancia de gulp-replace
agrego tareas para elminar archivos postinstall
Showing
1 changed file
with
18 additions
and
1 deletions
Show diff stats
gulpfile.js
... | ... | @@ -7,6 +7,7 @@ const uglify = require('gulp-uglify-es').default; |
7 | 7 | const gulp = require('gulp'); |
8 | 8 | const pump = require('pump'); |
9 | 9 | const jshint = require('gulp-jshint'); |
10 | +const replace = require('gulp-replace'); | |
10 | 11 | |
11 | 12 | var paths = { |
12 | 13 | srcJS: 'src/js/*.js', |
... | ... | @@ -37,6 +38,8 @@ gulp.task('uglify', ['templates'], function() { |
37 | 38 | 'tmp/views.js' |
38 | 39 | ]), |
39 | 40 | concat('foca-abm-precios-condiciones.js'), |
41 | + replace('src/views/', ''), | |
42 | + replace("['ngRoute', 'ui.bootstrap']", '[]'), | |
40 | 43 | gulp.dest(paths.tmp), |
41 | 44 | rename('foca-abm-precios-condiciones.min.js'), |
42 | 45 | uglify(), |
... | ... | @@ -45,7 +48,7 @@ gulp.task('uglify', ['templates'], function() { |
45 | 48 | ); |
46 | 49 | }); |
47 | 50 | |
48 | -gulp.task('clean', function(){ | |
51 | +gulp.task('clean', function() { | |
49 | 52 | return gulp.src(['tmp', 'dist'], {read: false}) |
50 | 53 | .pipe(clean()); |
51 | 54 | }); |
... | ... | @@ -60,3 +63,17 @@ gulp.task('pre-commit', function() { |
60 | 63 | ] |
61 | 64 | ); |
62 | 65 | }); |
66 | + | |
67 | +gulp.task('clean-post-install', function(){ | |
68 | + return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', | |
69 | + 'index.html'], {read: false}) | |
70 | + .pipe(clean()); | |
71 | +}); | |
72 | + | |
73 | +gulp.task('webserver', function() { | |
74 | + pump [ | |
75 | + connect.server({port: 3000}) | |
76 | + ] | |
77 | +}); | |
78 | + | |
79 | +gulp.task('default', ['webserver']); |