-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
99 lines (76 loc) · 2.24 KB
/
gruntfile.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
//encode special characters to HTML entity
'special-html': {
compile: {
files: {
'email.html': '*.html',
}
}
},
//upload local images to Rackspace CDN
cloudfiles: {
prod: {
'user': 'your username',
'key': 'your API key',
'region': 'IAD',
'upload': [{
'container': 'your container name',
'src': 'images/*',
'dest': 'images/',
}]
}
},
//change local path to new CDN path
cdnify: {
someTarget: {
options: {
base: 'your CDN path'
},
files: [{
expand: true,
cwd: '',
src: '*.html',
dest: 'dist'
}]
}
},
//send a test mail via mailgun
mailgun: {
marketingTemplates: {
options: {
key: 'key-your mail gun API key',
sender: 'sender email',
recipient: 'recipients name',
subject: 'This is a test email',
preventThreading: true,
hideRecipient: true
},
src: ['dist/email.html']
}
},
//testing email with Litmus
litmus: {
test: {
src: ['dist/email.html'],
options: {
username: 'your username',
password: 'your password',
url: 'your url',
clients: ['gmailnew', 'ffgmailnew', 'chromegmailnew','android4','aolonline','ffaolonline','chromeaolonline','appmail7','appmail8','colorblind','messagelabs','ipadmini','ipad','barracuda','outlookfilter','spamassassin3','gmailnewspam','yahoospam','aolonlinespam','googleapps','chromegoogleapps','ffgoogleapps','iphone5s','iphone5sios8','iphone6','iphone6plus','iphone6s','iphone6splus','ol2000','ol2002','ol2003','ol2007','ol2010','ol2011','ol2013','ol2015','ol2016','outlookcom','ffoutlookcom','chromeoutlookcom','office365','chromeoffice365','thunderbirdlatest','yahoo','ffyahoo','chromeyahoo']
}
}
}
} );
// Load the Tasks
grunt.loadNpmTasks('grunt-special-html');
grunt.loadNpmTasks('grunt-cloudfiles');
grunt.loadNpmTasks('grunt-cdnify');
grunt.loadNpmTasks('grunt-mailgun');
grunt.loadNpmTasks('grunt-litmus');
// Register the Tasks
grunt.registerTask('encode', ['special-html']);
grunt.registerTask('email',['special-html','cloudfiles','cdnify','mailgun']);
};