Commit 6bbc7b07e8c702ce87168b9e0ccd549d0370ac53

Authored by Nicolás Guarnieri
1 parent 360215e77e
Exists in master

package.json fixeado para ser instalado

Showing 2 changed files with 33 additions and 3 deletions   Show diff stats
1 const gulp = require('gulp'); 1 const gulp = require('gulp');
2 const concat = require('gulp-concat'); 2 const concat = require('gulp-concat');
3 const rename = require('gulp-rename'); 3 const rename = require('gulp-rename');
4 const uglify = require('gulp-uglify'); 4 const uglify = require('gulp-uglify');
5 const pump = require('pump'); 5 const pump = require('pump');
6 const jshint = require('gulp-jshint'); 6 const jshint = require('gulp-jshint');
7 const replace = require('gulp-replace'); 7 const replace = require('gulp-replace');
8 const clean = require('gulp-clean');
8 9
9 var paths = { 10 var paths = {
10 srcHTML : 'src/views/*.html', 11 srcHTML : 'src/views/*.html',
11 srcJS : 'src/js/*.js', 12 srcJS : 'src/js/*.js',
12 confJS : 'src/etc/develop.js', 13 confJS : 'src/etc/develop.js',
13 dist : 'dist/', 14 dist : 'dist/',
14 temp : 'tmp/', 15 temp : 'tmp/',
15 distHTML : 'dist/views/' 16 distHTML : 'dist/views/'
16 }; 17 };
17 18
18 gulp.task('uglify', function() { 19 gulp.task('uglify', function() {
19 pump( 20 pump(
20 [ 21 [
21 gulp.src([paths.srcJS, paths.confJS]), 22 gulp.src([paths.srcJS, paths.confJS]),
22 concat('foca-configuracion.js'), 23 concat('foca-configuracion.js'),
23 replace('/src/', '/dist/'), 24 replace('/src/', '/dist/'),
24 gulp.dest(paths.temp), 25 gulp.dest(paths.temp),
25 rename('foca-configuracion.min.js'), 26 rename('foca-configuracion.min.js'),
26 uglify(), 27 uglify(),
27 gulp.dest(paths.dist) 28 gulp.dest(paths.dist)
28 ] 29 ]
29 ); 30 );
30 }); 31 });
31 32
33 gulp.task('clean-post-install', function() {
34 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
35 'index.html'], {read: false})
36 .pipe(clean());
37 });
38
32 gulp.task('pre-commit', function() { 39 gulp.task('pre-commit', function() {
33 pump( 40 pump(
34 [ 41 [
35 gulp.src(paths.srcJS), 42 gulp.src(paths.srcJS),
36 jshint('.jshintrc'), 43 jshint('.jshintrc'),
37 jshint.reporter('default'), 44 jshint.reporter('default'),
38 jshint.reporter('fail') 45 jshint.reporter('fail')
39 ] 46 ]
40 ); 47 );
41 gulp.start('uglify'); 48 gulp.start('uglify');
42 }); 49 });
43 50
44 gulp.task('default', ['uglify']); 51 gulp.task('default', ['uglify']);
45 52
1 { 1 {
2 "name": "foca-configuracion", 2 "name": "foca-configuracion",
3 "version": "0.0.1", 3 "version": "0.0.1",
4 "description": "", 4 "description": "",
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 "gulp-pre-commit": "gulp pre-commit",
9 "postinstall": "gulp uglify",
10 "install-dev": "npm install -D gulp gulp-connect jasmine-core pre-commit angular angular-route angular-cookies bootstrap font-awesome gulp-angular-templatecache gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify gulp-replace jquery jshint pump"
8 }, 11 },
12 "pre-commit": [
13 "gulp-pre-commit"
14 ],
9 "repository": { 15 "repository": {
10 "type": "git", 16 "type": "git",
11 "url": "https://debo.suite.repo/modulos-npm/foca-configuracion.git" 17 "url": "https://debo.suite.repo/modulos-npm/foca-configuracion.git"
12 }, 18 },
13 "author": "Nicolás Guarnieri", 19 "author": "Nicolás Guarnieri",
14 "license": "ISC", 20 "license": "ISC",
15 "dependencies": { 21 "peerDependencies": {
16 "angular": "^1.7.5", 22 "angular": "^1.7.5",
17 "angular-cookies": "^1.7.5", 23 "angular-cookies": "^1.7.5",
18 "angular-route": "^1.7.5", 24 "angular-route": "^1.7.5",
19 "gulp": "^3.9.1", 25 "gulp": "^3.9.1",
20 "gulp-angular-templatecache": "^2.2.3", 26 "gulp-angular-templatecache": "^2.2.3",
21 "gulp-clean": "^0.4.0", 27 "gulp-clean": "^0.4.0",
22 "gulp-concat": "^2.6.1", 28 "gulp-concat": "^2.6.1",
23 "gulp-jshint": "^2.1.0", 29 "gulp-jshint": "^2.1.0",
24 "gulp-rename": "^1.4.0", 30 "gulp-rename": "^1.4.0",
25 "gulp-replace": "^1.0.0", 31 "gulp-replace": "^1.0.0",
26 "gulp-uglify": "^3.0.1", 32 "gulp-uglify": "^3.0.1",
27 "jquery": "^3.3.1", 33 "jquery": "^3.3.1",
28 "jshint": "^2.9.6", 34 "jshint": "^2.9.6",
29 "pre-commit": "^1.2.2", 35 "pre-commit": "^1.2.2",
30 "pump": "^3.0.0" 36 "pump": "^3.0.0"
31 } 37 },
38 "devDependencies": {
39 "angular": "^1.7.5",
40 "angular-cookies": "^1.7.5",
41 "angular-route": "^1.7.5",
42 "gulp": "^3.9.1",
43 "gulp-angular-templatecache": "^2.2.3",
44 "gulp-clean": "^0.4.0",
45 "gulp-concat": "^2.6.1",
46 "gulp-jshint": "^2.1.0",
47 "gulp-rename": "^1.4.0",
48 "gulp-replace": "^1.0.0",
49 "gulp-uglify": "^3.0.1",
50 "jquery": "^3.3.1",
51 "jshint": "^2.9.6",
52 "pre-commit": "^1.2.2",
53 "pump": "^3.0.0"
54 },
32 } 55 }
33 56