Commit 5c77da45374ab3de5ac006b22a07720abc323634
Exists in
master
Merge branch 'master' into 'master'
Master(efernandez) See merge request modulos-npm/foca-abm-precios-condiciones!1
Showing
8 changed files
 
Show diff stats
.gitignore
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']); | 
index.html
| ... | ... | @@ -0,0 +1,29 @@ | 
| 1 | +<html ng-app="focaAbmPreciosCondiciones"> | |
| 2 | + | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8" /> | |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| 6 | + | |
| 7 | + <!--CSS--> | |
| 8 | + <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" /> | |
| 9 | + <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> | |
| 10 | + | |
| 11 | + <!--VENDOR JS--> | |
| 12 | + <script src="node_modules/jquery/dist/jquery.min.js"></script> | |
| 13 | + <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> | |
| 14 | + <script src="node_modules/angular/angular.min.js"></script> | |
| 15 | + <script src="node_modules/angular-route/angular-route.min.js"></script> | |
| 16 | + <script src="node_modules/ui-bootstrap4/dist/ui-bootstrap-tpls.js"></script> | |
| 17 | + | |
| 18 | + <!-- BUILD --> | |
| 19 | + <script src="src/js/app.js"></script> | |
| 20 | + <script src="src/js/route.js"></script> | |
| 21 | + <script src="src/js/controller.js"></script> | |
| 22 | + <script src="src/js/service.js"></script> | |
| 23 | + <script src="src/etc/develop.js"></script> | |
| 24 | + <!-- /BUILD --> | |
| 25 | + | |
| 26 | +<body ng-view> | |
| 27 | +</body> | |
| 28 | + | |
| 29 | +</html> | |
| 0 | 30 | \ No newline at end of file | 
package.json
| ... | ... | @@ -6,11 +6,13 @@ | 
| 6 | 6 | "scripts": { | 
| 7 | 7 | "test": "echo \"Error: no test specified\" && exit 1", | 
| 8 | 8 | "compile": "gulp uglify", | 
| 9 | - "pre-commit": [ | |
| 10 | - "gulp-pre-commit" | |
| 11 | - ], | |
| 12 | - "postinstall": "npm run compile && rm -R src && rm index.html && rm .jshintrc && rm gulpfile.js" | |
| 9 | + "gulp-pre-commit": "gulp pre-commit", | |
| 10 | + "postinstall": "npm run compile && gulp clean-post-install", | |
| 11 | + "install-dev": "npm install -D jasmine-core pre-commit angular 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-replace jquery jshint pump" | |
| 13 | 12 | }, | 
| 13 | + "pre-commit": [ | |
| 14 | + "gulp-pre-commit" | |
| 15 | + ], | |
| 14 | 16 | "repository": { | 
| 15 | 17 | "type": "git", | 
| 16 | 18 | "url": "https://192.168.0.11/modulos-npm/foca-abm-precios-condiciones.git" | 
| ... | ... | @@ -32,24 +34,25 @@ | 
| 32 | 34 | "pump": "^3.0.x" | 
| 33 | 35 | }, | 
| 34 | 36 | "devDependencies": { | 
| 37 | + "angular": "^1.7.4", | |
| 38 | + "angular-route": "^1.7.5", | |
| 39 | + "bootstrap": "^4.1.3", | |
| 40 | + "font-awesome": "^4.7.0", | |
| 41 | + "gulp": "^3.9.1", | |
| 42 | + "gulp-angular-templatecache": "^2.2.1", | |
| 43 | + "gulp-clean": "^0.4.0", | |
| 35 | 44 | "gulp-connect": "^5.6.1", | 
| 36 | - "jasmine-core": "3.2.1", | |
| 37 | - "pre-commit": "^1.2.2" | |
| 38 | - }, | |
| 39 | - "dependencies": { | |
| 40 | - "angular": "1.7.4", | |
| 41 | - "bootstrap": "4.1.3", | |
| 42 | - "font-awesome": "4.7.0", | |
| 43 | - "gulp-angular-templatecache": "2.2.1", | |
| 44 | - "gulp-clean": "0.4.0", | |
| 45 | - "gulp-htmlmin": "5.0.1", | |
| 46 | - "gulp-jshint": "2.1.0", | |
| 47 | - "gulp-rename": "1.4.0", | |
| 48 | - "gulp-replace": "1.0.0", | |
| 49 | - "gulp-sequence": "1.0.0", | |
| 50 | - "gulp-uglify-es": "1.0.4", | |
| 51 | - "jquery": "3.3.1", | |
| 52 | - "jshint": "2.9.6", | |
| 53 | - "pump": "3.0.0" | |
| 45 | + "gulp-htmlmin": "^5.0.1", | |
| 46 | + "gulp-jshint": "^2.1.0", | |
| 47 | + "gulp-rename": "^1.4.0", | |
| 48 | + "gulp-replace": "^1.0.0", | |
| 49 | + "gulp-sequence": "^1.0.0", | |
| 50 | + "gulp-uglify-es": "^1.0.4", | |
| 51 | + "jasmine-core": "^3.2.1", | |
| 52 | + "jquery": "^3.3.1", | |
| 53 | + "jshint": "^2.9.6", | |
| 54 | + "pre-commit": "^1.2.2", | |
| 55 | + "pump": "^3.0.0", | |
| 56 | + "ui-bootstrap4": "^3.0.5" | |
| 54 | 57 | } | 
| 55 | 58 | } | 
src/etc/develop.js
src/js/app.js
src/js/controller.js
src/js/route.js
| ... | ... | @@ -4,7 +4,7 @@ angular.module('focaAbmPreciosCondiciones') | 
| 4 | 4 | function($routeProvider) { | 
| 5 | 5 | $routeProvider.when('/precio-condicion', { | 
| 6 | 6 | controller: 'focaAbmPreciosCondicionesController', | 
| 7 | - templateUrl: 'foca-abm-precios-condiciones-listado.html' | |
| 7 | + templateUrl: 'src/views/foca-abm-precios-condiciones-listado.html' | |
| 8 | 8 | }); | 
| 9 | 9 | } | 
| 10 | 10 | ]) | 
| ... | ... | @@ -13,7 +13,7 @@ angular.module('focaAbmPreciosCondiciones') | 
| 13 | 13 | function($routeProvider) { | 
| 14 | 14 | $routeProvider.when('/precio-condicion/:id', { | 
| 15 | 15 | controller: 'focaAbmPrecioCondicionController', | 
| 16 | - templateUrl: 'foca-abm-precios-condiciones-item.html' | |
| 16 | + templateUrl: 'src/views/foca-abm-precios-condiciones-item.html' | |
| 17 | 17 | }); | 
| 18 | 18 | } | 
| 19 | 19 | ]); |