Commit 71bdf1c374d83f5057f2cbbf9bb052532a626e30

Authored by Jose Pinto
1 parent 8937dda114
Exists in master

ok url, ok gulp replace

Showing 2 changed files with 2 additions and 2 deletions   Show diff stats
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 htmlmin = require('gulp-htmlmin'); 3 const htmlmin = require('gulp-htmlmin');
4 const rename = require('gulp-rename'); 4 const rename = require('gulp-rename');
5 const uglify = require('gulp-uglify'); 5 const uglify = require('gulp-uglify');
6 const gulp = require('gulp'); 6 const gulp = require('gulp');
7 const pump = require('pump'); 7 const pump = require('pump');
8 const jshint = require('gulp-jshint'); 8 const jshint = require('gulp-jshint');
9 const replace = require('gulp-replace'); 9 const replace = require('gulp-replace');
10 const connect = require('gulp-connect'); 10 const connect = require('gulp-connect');
11 const clean = require('gulp-clean'); 11 const clean = require('gulp-clean');
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', function() { 20 gulp.task('templates', 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: 'focaModalLocalizar', 26 module: 'focaModalLocalizar',
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-localizar.js'), 41 concat('foca-modal-localizar.js'),
42 replace('src/views/', ''), 42 replace('src/views/', ''),
43 replace("['ui.bootstrap', 'focaDirectivas']", '[]'), 43 replace("['ui.bootstrap', 'focaDirectivas', 'focaModal']", '[]'),
44 gulp.dest(paths.tmp), 44 gulp.dest(paths.tmp),
45 rename('foca-modal-localizar.min.js'), 45 rename('foca-modal-localizar.min.js'),
46 uglify(), 46 uglify(),
47 gulp.dest(paths.dist) 47 gulp.dest(paths.dist)
48 ] 48 ]
49 ); 49 );
50 }); 50 });
51 51
52 gulp.task('pre-commit', function() { 52 gulp.task('pre-commit', function() {
53 return pump( 53 return pump(
54 [ 54 [
55 gulp.src(paths.srcJS), 55 gulp.src(paths.srcJS),
56 jshint('.jshintrc'), 56 jshint('.jshintrc'),
57 jshint.reporter('default'), 57 jshint.reporter('default'),
58 jshint.reporter('fail') 58 jshint.reporter('fail')
59 ] 59 ]
60 ); 60 );
61 61
62 gulp.start('uglify'); 62 gulp.start('uglify');
63 }); 63 });
64 64
65 gulp.task('webserver', function() { 65 gulp.task('webserver', function() {
66 pump [ 66 pump [
67 connect.server({port: 3000}) 67 connect.server({port: 3000})
68 ] 68 ]
69 }); 69 });
70 70
71 gulp.task('clean-post-install', function(){ 71 gulp.task('clean-post-install', function(){
72 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js', 72 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
73 'index.html'], {read: false}) 73 'index.html'], {read: false})
74 .pipe(clean()); 74 .pipe(clean());
75 }); 75 });
76 76
77 gulp.task('default', ['webserver']); 77 gulp.task('default', ['webserver']);
78 78
79 gulp.task('watch', function() { 79 gulp.task('watch', function() {
80 gulp.watch([paths.srcJS, paths.srcViews], ['uglify']) 80 gulp.watch([paths.srcJS, paths.srcViews], ['uglify'])
81 }); 81 });
82 82
1 { 1 {
2 "name": "foca-modal-localizar", 2 "name": "foca-modal-localizar",
3 "version": "0.0.1", 3 "version": "0.0.1",
4 "description": "Modal para localizar domicilio", 4 "description": "Modal para localizar domicilio",
5 "scripts": { 5 "scripts": {
6 "test": "echo \"Error: no test specified\" && exit 1", 6 "test": "echo \"Error: no test specified\" && exit 1",
7 "gulp-pre-commit": "gulp pre-commit", 7 "gulp-pre-commit": "gulp pre-commit",
8 "compile": "gulp uglify", 8 "compile": "gulp uglify",
9 "postinstall": "npm run compile && gulp clean-post-install", 9 "postinstall": "npm run compile && gulp clean-post-install",
10 "install-dev": "npm install -D angular bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+http://git.focasoftware.com/npm/foca-directivas.git" 10 "install-dev": "npm install -D angular bootstrap font-awesome gulp gulp-angular-templatecache gulp-concat gulp-connect gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-uglify gulp-clean jasmine-core jquery jshint pre-commit pump ui-bootstrap4 && npm i -D git+http://git.focasoftware.com/npm/foca-directivas.git"
11 }, 11 },
12 "pre-commit": [ 12 "pre-commit": [
13 "gulp-pre-commit" 13 "gulp-pre-commit"
14 ], 14 ],
15 "repository": { 15 "repository": {
16 "type": "git", 16 "type": "git",
17 "url": "https://debo.suite.repo/modulos-npm/foca-modal-localizar.git" 17 "url": "http://git.focasoftware.com/npm/foca-modal-localizar.git"
18 }, 18 },
19 "author": "Foca Software", 19 "author": "Foca Software",
20 "license": "ISC", 20 "license": "ISC",
21 "peerDependencies": { 21 "peerDependencies": {
22 "angular": "^1.7.4", 22 "angular": "^1.7.4",
23 "bootstrap": "^4.1.3", 23 "bootstrap": "^4.1.3",
24 "font-awesome": "^4.7.0", 24 "font-awesome": "^4.7.0",
25 "ui-bootstrap4": "^3.0.4", 25 "ui-bootstrap4": "^3.0.4",
26 "gulp": "^3.9.1", 26 "gulp": "^3.9.1",
27 "gulp-angular-templatecache": "^2.2.1", 27 "gulp-angular-templatecache": "^2.2.1",
28 "gulp-concat": "^2.6.1", 28 "gulp-concat": "^2.6.1",
29 "gulp-connect": "^5.6.1", 29 "gulp-connect": "^5.6.1",
30 "gulp-htmlmin": "^5.0.1", 30 "gulp-htmlmin": "^5.0.1",
31 "gulp-rename": "^1.4.0", 31 "gulp-rename": "^1.4.0",
32 "gulp-replace": "^1.0.0", 32 "gulp-replace": "^1.0.0",
33 "gulp-uglify": "^3.0.1", 33 "gulp-uglify": "^3.0.1",
34 "jquery": "^3.3.1", 34 "jquery": "^3.3.1",
35 "pump": "^3.0.0", 35 "pump": "^3.0.0",
36 "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git" 36 "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git"
37 }, 37 },
38 "devDependencies": { 38 "devDependencies": {
39 "angular": "^1.7.5", 39 "angular": "^1.7.5",
40 "bootstrap": "^4.1.3", 40 "bootstrap": "^4.1.3",
41 "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git", 41 "foca-directivas": "git+http://git.focasoftware.com/npm/foca-directivas.git",
42 "font-awesome": "^4.7.0", 42 "font-awesome": "^4.7.0",
43 "gulp": "^3.9.1", 43 "gulp": "^3.9.1",
44 "gulp-angular-templatecache": "^2.2.3", 44 "gulp-angular-templatecache": "^2.2.3",
45 "gulp-clean": "^0.4.0", 45 "gulp-clean": "^0.4.0",
46 "gulp-concat": "^2.6.1", 46 "gulp-concat": "^2.6.1",
47 "gulp-connect": "^5.6.1", 47 "gulp-connect": "^5.6.1",
48 "gulp-htmlmin": "^5.0.1", 48 "gulp-htmlmin": "^5.0.1",
49 "gulp-jshint": "^2.1.0", 49 "gulp-jshint": "^2.1.0",
50 "gulp-rename": "^1.4.0", 50 "gulp-rename": "^1.4.0",
51 "gulp-replace": "^1.0.0", 51 "gulp-replace": "^1.0.0",
52 "gulp-uglify": "^3.0.1", 52 "gulp-uglify": "^3.0.1",
53 "jasmine-core": "^3.3.0", 53 "jasmine-core": "^3.3.0",
54 "jquery": "^3.3.1", 54 "jquery": "^3.3.1",
55 "jshint": "^2.9.6", 55 "jshint": "^2.9.6",
56 "leaflet": "^1.3.4", 56 "leaflet": "^1.3.4",
57 "pre-commit": "^1.2.2", 57 "pre-commit": "^1.2.2",
58 "pump": "^3.0.0", 58 "pump": "^3.0.0",
59 "ui-bootstrap4": "^3.0.5" 59 "ui-bootstrap4": "^3.0.5"
60 } 60 }
61 } 61 }
62 62