Commit 8b16db8d677796f830962b31e0e16aaac906937a

Authored by Eric Fernandez
0 parents
Exists in master

first commit

File was created 1 /node_modules
2 /package-lock.json
File was created 1 {
2 /*
3 * ENVIRONMENTS
4 * =================
5 */
6
7 // Define globals exposed by modern browsers.
8 "browser": true,
9
10 // Define globals exposed by jQuery.
11 "jquery": true,
12
13 // Define globals exposed by Node.js.
14 "node": true,
15
16 // Allow ES6.
17 "esversion": 6,
18
19 /*
20 * ENFORCING OPTIONS
21 * =================
22 */
23
24 // Force all variable names to use either camelCase style or UPPER_CASE
25 // with underscores.
26 "camelcase": false,
27
28 // Prohibit use of == and != in favor of === and !==.
29 "eqeqeq": true,
30
31 // Enforce tab width of 2 spaces.
32 "indent": 4,
33
34 // Prohibit use of a variable before it is defined.
35 "latedef": false,
36
37 // Enforce line length to 100 characters
38 "maxlen": 100,
39
40 // Require capitalized names for constructor functions.
41 "newcap": true,
42
43 // Enforce use of single quotation marks for strings.
44 "quotmark": "single",
45
46 // Enforce placing 'use strict' at the top function scope
47 "strict": false,
48
49 // Prohibit use of explicitly undeclared variables.
50 "undef": true,
51
52 // Warn when variables are defined but never used.
53 "unused": true,
54
55 // Para que funcione en angular
56 "predef": ["angular", "alert", "spyOn", "expect", "it", "inject", "beforeEach", "describe"],
57 /*
58 * RELAXING OPTIONS
59 * =================
60 */
61
62 // Suppress warnings about == null comparisons.
63 "eqnull": true
64 }
65
File was created 1 #FACTURADOR WEB-MOBILE
2
File was created 1 const templateCache = require('gulp-angular-templatecache');
2 const clean = require('gulp-clean');
3 const concat = require('gulp-concat');
4 const htmlmin = require('gulp-htmlmin');
5 const rename = require('gulp-rename');
6 const uglify = require('gulp-uglify');
7 const gulp = require('gulp');
8 const pump = require('pump');
9 const jshint = require('gulp-jshint');
10 const replace = require('gulp-replace');
11 const connect = require('gulp-connect');
12 const header = require('gulp-header');
13 const footer = require('gulp-footer');
14 const gulpSequence = require('gulp-sequence');
15
16 var paths = {
17 srcJS: 'src/js/*.js',
18 srcViews: 'src/views/*.html',
19 specs: 'spec/*.js',
20 tmp: 'tmp',
21 dist: 'dist/'
22 };
23
24 gulp.task('uglify', function(callback) {
25 gulpSequence('clean', ['templates'], 'uglify-app')(callback);
26 });
27
28 gulp.task('templates', function() {
29 return pump(
30 [
31 gulp.src(paths.srcViews),
32 htmlmin(),
33 templateCache('views.js', {
34 module: 'focaCrearFactura',
35 root: ''
36 }),
37 gulp.dest(paths.tmp)
38 ]
39 );
40 });
41
42 gulp.task('uglify-app', function() {
43 return pump(
44 [
45 gulp.src([
46 paths.srcJS,
47 'tmp/views.js'
48 ]),
49 concat('foca-crear-factura.js'),
50 replace('src/views/', ''),
51 gulp.dest(paths.tmp),
52 rename('foca-crear-factura.min.js'),
53 uglify(),
54 gulp.dest(paths.dist)
55 ]
56 );
57 });
58
59 gulp.task('uglify-spec', function() {
60 return pump(
61 [
62 gulp.src(paths.specs),
63 concat('foca-crear-factura.spec.js'),
64 replace('src/views/', ''),
65 header("describe('Módulo foca-crear-factura', function() { \n"),
66 footer("});"),
67 gulp.dest(paths.dist)
68 ]
69 );
70 });
71
72 gulp.task('clean', function() {
73 return gulp.src(['tmp', 'dist'], {read: false}).pipe(clean());
74 });
75
76 gulp.task('pre-commit', function() {
77 return pump(
78 [
79 gulp.src([paths.srcJS, paths.specs]),
80 jshint('.jshintrc'),
81 jshint.reporter('default'),
82 jshint.reporter('fail')
83 ]
84 );
85
86 gulp.start('uglify');
87 });
88
89 gulp.task('webserver', function() {
90 pump [
91 connect.server({port: 3300, host: '0.0.0.0'})
92 ]
93 });
94
95 gulp.task('clean-post-install', function() {
96 return gulp.src(['src', 'tmp', '.jshintrc','readme.md', '.gitignore', 'gulpfile.js',
97 'index.html'], {read: false})
98 .pipe(clean());
99 });
100
101 gulp.task('default', ['webserver']);
102
103 gulp.task('watch', function() {
104 gulp.watch([paths.srcJS, paths.srcViews], ['uglify']);
105 });
106
107 gulp.task('copy', ['uglify'], function() {
108 return gulp.src('dist/*.js')
109 .pipe(gulp.dest('../../wrapper-demo/node_modules/foca-crear-remito/dist/'));
110 });
111
112 gulp.task('watchAndCopy', function() {
113 return gulp.watch([paths.srcJS, paths.srcViews], ['copy']);
114 });
115
File was created 1 {
2 "name": "foca-crear-factura",
3 "version": "0.0.1",
4 "description": "",
5 "main": "index.js",
6 "scripts": {
7 "test": "echo \"Error: no test specified\" && exit 1",
8 "install-dev": "npm install -D jasmine-core pre-commit angular angular-ladda ladda@1.0.6 angular-route angular-cookies 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"
9 },
10 "repository": {
11 "type": "git",
12 "url": "http://git.focasoftware.com/npm/foca-crear-factura.git"
13 },
14 "author": "Foca Software",
15 "license": "ISC",
16 "devDependencies": {
17 "angular": "^1.7.8",
18 "angular-cookies": "^1.7.8",
19 "angular-ladda": "^0.4.3",
20 "angular-route": "^1.7.8",
21 "bootstrap": "^4.3.1",
22 "font-awesome": "^4.7.0",
23 "gulp": "^4.0.2",
24 "gulp-angular-templatecache": "^3.0.0",
25 "gulp-clean": "^0.4.0",
26 "gulp-connect": "^5.7.0",
27 "gulp-htmlmin": "^5.0.1",
28 "gulp-jshint": "^2.1.0",
29 "gulp-rename": "^1.4.0",
30 "gulp-replace": "^1.0.0",
31 "gulp-sequence": "^1.0.0",
32 "gulp-uglify": "^3.0.2",
33 "gulp-uglify-es": "^1.0.4",
34 "jasmine-core": "^3.4.0",
35 "jquery": "^3.4.1",
36 "jshint": "^2.10.2",
37 "ladda": "^1.0.6",
38 "pre-commit": "^1.2.2",
39 "pump": "^3.0.0",
40 "ui-bootstrap4": "^3.0.6"
41 }
42 }
43