Commit c471375bbce220082a1438ece49e5024b939a521

Authored by Pablo Marco del Pont
Exists in master

Merge branch 'master' into 'master'

Master(efernandez)

See merge request modulos-npm/foca-login!2
... ... @@ -2,3 +2,4 @@
2 2 /dist
3 3 /tmp
4 4 package-lock\.json
  5 +/src/etc/develop.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-login.js'),
  41 + replace("['ngRoute', 'ngCookies']",'[]'),
  42 + replace('src/views/', ''),
40 43 gulp.dest(paths.tmp),
41 44 rename('foca-login.min.js'),
42 45 uglify(),
... ... @@ -0,0 +1,26 @@
  1 +<html ng-app="focaLogin">
  2 + <head>
  3 + <meta charset="UTF-8"/>
  4 + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  5 +
  6 + <!--CSS-->
  7 + <link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"/>
  8 + <link href="node_modules/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
  9 +
  10 + <!--VENDOR JS-->
  11 + <script src="node_modules/jquery/dist/jquery.min.js"></script>
  12 + <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
  13 + <script src="node_modules/angular/angular.min.js"></script>
  14 + <script src="node_modules/angular-route/angular-route.min.js"></script>
  15 + <script src="node_modules/angular-cookies/angular-cookies.min.js"></script>
  16 +
  17 + <script src="src/js/app.js"></script>
  18 + <script src="src/js/route.js"></script>
  19 + <script src="src/js/controller.js"></script>
  20 + <script src="src/js/service.js"></script>
  21 + <script src="src/etc/develop.js"></script>
  22 + </head>
  23 + <body ng-view>
  24 +
  25 + </body>
  26 +</html>
... ... @@ -8,7 +8,7 @@
8 8 "compile": "gulp compile",
9 9 "gulp-pre-commit": "gulp pre-commit",
10 10 "postinstall": "npm run compile && gulp clean-post-install",
11   - "install-dev": "npm install -D gulp gulp-connect jasmine-core pre-commit angular bootstrap font-awesome gulp-angular-templatecache gulp-clean gulp-htmlmin gulp-jshint gulp-rename gulp-replace gulp-sequence gulp-uglify-es jquery jshint pump"
  11 + "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-es gulp-replace jquery jshint pump"
12 12 },
13 13 "pre-commit": [
14 14 "gulp-pre-commit"
... ... @@ -34,7 +34,9 @@
34 34 "pump": "^3.0.x"
35 35 },
36 36 "devDependencies": {
37   - "angular": "^1.7.4",
  37 + "angular": "^1.7.5",
  38 + "angular-cookies": "^1.7.5",
  39 + "angular-route": "^1.7.5",
38 40 "bootstrap": "^4.1.3",
39 41 "font-awesome": "^4.7.0",
40 42 "gulp": "^3.9.1",
src/etc/develop.js.ejemplo
... ... @@ -0,0 +1,4 @@
  1 +angular.module('focaLogin')
  2 + .constant("API_ENDPOINT", {
  3 + 'URL': 'http://192.168.0.23:9900'
  4 + });
1   -angular.module('focaLogin', [])
  1 +angular.module('focaLogin', ['ngRoute', 'ngCookies'])
2 2 .run(['$rootScope', '$cookies', '$location', function($rootScope, $cookies, $location) {
3 3 $rootScope.$on('$locationChangeStart', function() {
4 4 var idUsuario = $cookies.get('idUsuario');
... ... @@ -5,7 +5,7 @@ angular.module(&#39;focaLogin&#39;)
5 5 $routeProvider
6 6 .when('/login', {
7 7 controller: 'focaLoginController',
8   - templateUrl: 'foca-login.html'
  8 + templateUrl: 'src/views/foca-login.html'
9 9 })
10 10 .when('/logout', {
11 11 controller: 'focaLogoutController',