-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
57 lines (45 loc) · 1.33 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'use strict';
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
clean = require('gulp-rimraf'),
stylish = require('jshint-stylish'),
complexity = require('gulp-complexity');
var path = { src: {} };
path.src.js = ['./index.js', './lib/*.js'];
path.src.complexity = ['./index.js', './lib/*.js'];
gulp.task('default', ['lint'], function() {
console.log('All the Javascript.');
});
gulp.task('lint', function() {
return gulp.src(path.src.js)
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
});
gulp.task('watch', function () {
var javascriptTasks = ['lint'];
gulp.watch(path.src.js, javascriptTasks);
});
/*
gulp.task('complexity', function(){
return gulp.src(path.src.complexity)
.pipe(complexity());
});
*/
var email = require('./index');
var options = {
user: 'api:key-bfc71afead753d73cef11c5485c1fd2b',
url: 'https://api.mailgun.net/v3/sandbox4a0fe54c0059454483eff6624145da45.mailgun.org/messages',
form: {
from: 'Jamir Kaleb <[email protected]>',
to: 'Jan Sanchez Hotmail <[email protected]>',
subject: 'Nuevo mensaje de correo !!!',
text: 'Texto plano del mensaje, esto se ve?'
}
};
gulp.task('email', function () {
return gulp.src('./demo/html/*.html')
.pipe(email(options, function(data, error){
console.log(data.message);
}));
});