Commit 6103604b8c04eb61acb2fa302b64625d4e388300

Authored by Nicolás Guarnieri
Exists in master

Merge

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'", ''),
43 gulp.dest(paths.tmp), 44 gulp.dest(paths.tmp),
44 rename('foca-crear-hoja-ruta.min.js'), 45 rename('foca-crear-hoja-ruta.min.js'),
45 uglify(), 46 uglify(),
46 /*replace('"ngRoute","ui.bootstrap","focaModalVendedores","focaBusquedaProductos",'+
47 '"focaModalProveedor","focaBusquedaCliente","focaModalPrecioCondicion",'+
48 '"focaModalFlete","focaDirectivas","focaModal","focaModalDomicilio",'+
49 '"focaModalMoneda","focaModalCotizacion","focaSeguimiento","angular-ladda",'+
50 '"cordovaGeolocationModule"', ''),*/
51 gulp.dest(paths.dist) 47 gulp.dest(paths.dist)
52 ] 48 ]
53 ); 49 );
54 }); 50 });
55 51
56 gulp.task('clean', function() { 52 gulp.task('clean', function() {
57 return gulp.src(['tmp', 'dist'], {read: false}) 53 return gulp.src(['tmp', 'dist'], {read: false})
58 .pipe(clean()); 54 .pipe(clean());
59 }); 55 });
60 56
61 gulp.task('pre-commit', function() { 57 gulp.task('pre-commit', function() {
62 return pump( 58 return pump(
63 [ 59 [
64 gulp.src(paths.srcJS), 60 gulp.src(paths.srcJS),
65 jshint('.jshintrc'), 61 jshint('.jshintrc'),
66 jshint.reporter('default'), 62 jshint.reporter('default'),
67 jshint.reporter('fail') 63 jshint.reporter('fail')
68 ] 64 ]
69 ); 65 );
70 66
71 gulp.start('uglify'); 67 gulp.start('uglify');
72 }); 68 });
73 69
74 gulp.task('webserver', function() { 70 gulp.task('webserver', function() {
75 pump [ 71 pump [
76 connect.server({port: 3300, host: '0.0.0.0'}) 72 connect.server({port: 3300, host: '0.0.0.0'})
77 ] 73 ]
78 }); 74 });
79 75
80 gulp.task('clean-post-install', function() { 76 gulp.task('clean-post-install', function() {
81 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', 77 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
82 'index.html'], {read: false}) 78 'index.html'], {read: false})
83 .pipe(clean()); 79 .pipe(clean());
84 }); 80 });
85 81
86 gulp.task('default', ['webserver']); 82 gulp.task('default', ['webserver']);
87 83
88 gulp.task('watch', function() { 84 gulp.task('watch', function() {
89 gulp.watch([paths.srcJS, paths.srcViews], ['uglify']); 85 gulp.watch([paths.srcJS, paths.srcViews], ['uglify']);
90 }); 86 });
1 { 1 {
2 "name": "foca-crear-hoja-ruta", 2 "name": "foca-crear-hoja-ruta",
3 "version": "0.0.1", 3 "version": "0.0.1",
4 "description": "foca-crear-hoja-ruta", 4 "description": "foca-crear-hoja-ruta",
5 "main": "index.js", 5 "main": "index.js",
6 "scripts": { 6 "scripts": {
7 "test": "echo \"Error: no test specified\" && exit 1" 7 "test": "echo \"Error: no test specified\" && exit 1",
8 }, 8 "compile": "gulp uglify",
9 "repository": { 9 "gulp-pre-commit": "gulp pre-commit",
10 "type": "git", 10 "postinstall": "npm run compile && gulp clean-post-install",
11 "url": "https://debo.suite.repo/modulos-npm/foca-crear-hoja-ruta.git" 11 "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route bootstrap ui-bootstrap4 font-awesome gulp gulp-angular-templatecache gulp-connect gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es gulp-uglify jquery jshint pump git+https://debo.suite.repo/modulos-npm/foca-directivas.git git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git"
12 }, 12 },
13 "author": "Foca Software", 13 "pre-commit": [
14 "license": "ISC", 14 "gulp-pre-commit"
15 "devDependencies": { 15 ],
16 "angular": "^1.7.5", 16 "repository": {
17 "angular-ladda": "^0.4.3", 17 "type": "git",
18 "angular-route": "^1.7.5", 18 "url": "https://debo.suite.repo/modulos-npm/foca-crear-hoja-ruta.git"
19 "bootstrap": "^4.1.3", 19 },
20 "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git", 20 "author": "Foca Software",
21 "foca-modal-chofer": "git+https://debo.suite.repo/modulos-npm/foca-modal-chofer.git", 21 "license": "ISC",
22 "foca-modal-remito": "git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git", 22 "devDependencies": {
23 "font-awesome": "^4.7.0", 23 "angular": "^1.7.5",
24 "gulp": "^3.9.1", 24 "angular-ladda": "^0.4.3",
25 "gulp-angular-templatecache": "^2.2.5", 25 "angular-route": "^1.7.5",
26 "gulp-clean": "^0.4.0", 26 "bootstrap": "^4.1.3",
27 "gulp-concat": "^2.6.1", 27 "foca-directivas": "git+https://debo.suite.repo/modulos-npm/foca-directivas.git",
28 "gulp-connect": "^5.6.1", 28 "foca-modal-remito": "git+https://debo.suite.repo/modulos-npm/foca-modal-remito.git",
29 "gulp-htmlmin": "^5.0.1", 29 "font-awesome": "^4.7.0",
30 "gulp-jshint": "^2.1.0", 30 "gulp": "^3.9.1",
31 "gulp-rename": "^1.4.0", 31 "gulp-angular-templatecache": "^2.2.5",
32 "gulp-replace": "^1.0.0", 32 "gulp-clean": "^0.4.0",
33 "gulp-sequence": "^1.0.0", 33 "gulp-concat": "^2.6.1",
34 "gulp-uglify": "^3.0.1", 34 "gulp-connect": "^5.6.1",
35 "jasmine-core": "^3.3.0", 35 "gulp-htmlmin": "^5.0.1",
36 "jquery": "^3.3.1", 36 "gulp-jshint": "^2.1.0",
37 "jshint": "^2.9.6", 37 "gulp-rename": "^1.4.0",
38 "ladda": "1.0.6", 38 "gulp-replace": "^1.0.0",
39 "pre-commit": "^1.2.2", 39 "gulp-sequence": "^1.0.0",
40 "pump": "^3.0.0", 40 "gulp-uglify": "^3.0.1",
41 "ui-bootstrap4": "^3.0.5" 41 "jasmine-core": "^3.3.0",
42 "jquery": "^3.3.1",
43 "jshint": "^2.9.6",
44 "ladda": "1.0.6",
45 "pre-commit": "^1.2.2",
46 "pump": "^3.0.0",
47 "ui-bootstrap4": "^3.0.5"
48 }
42 } 49 }
43 } 50
1 angular.module('focaCrearHojaRuta', [ 1 angular.module('focaCrearHojaRuta', ['ngRoute', 'focaModalRemito', 'ui.bootstrap'/*,
2 'ngRoute',
3 'focaModalRemito',
4 'ui.bootstrap'/*,
5 'focaBusquedaProductos', 2 'focaBusquedaProductos',
6 'focaModalProveedor', 3 'focaModalProveedor',
7 'focaBusquedaCliente', 4 'focaBusquedaCliente',
8 'focaModalPrecioCondicion', 5 'focaModalPrecioCondicion',
9 'focaModalFlete', 6 'focaModalFlete',
10 'focaDirectivas', 7 'focaDirectivas',
11 'focaModal', 8 'focaModal',
12 'focaModalDomicilio', 9 'focaModalDomicilio',
13 'focaModalMoneda', 10 'focaModalMoneda',
14 'focaModalCotizacion', 11 'focaModalCotizacion',
15 'focaSeguimiento', 12 'focaSeguimiento',
16 'angular-ladda', 13 'angular-ladda',
17 'cordovaGeolocationModule'*/ 14 'cordovaGeolocationModule'*/
18 ]); 15 ]);
19 16