/
Gruntfile.coffee
92 lines (75 loc) · 2.02 KB
/
Gruntfile.coffee
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
module.exports = (grunt) ->
grunt.initConfig
# Watch task
watch:
files: [
'<%= jshint.all %>',
'example/html/*.html',
'example/css/*.css',
]
tasks: 'test'
# JS Hint task
jshint:
options:
jshintrc: '.jshintrc'
all: [
'tasks/**/*.js'
'<%= nodeunit.tests %>'
]
# JS Tests
nodeunit:
tests: ['test/*_test.js']
# Clean out the test files
clean: ['example/test']
emailBuilder:
test:
options:
encodeSpecialChars: true
# litmus :
# subject: 'Custom subject line' # Optional, defaults to title of email or yyyy-mm-dd if title or options.subject empty
# username : 'user'
# password : 'password'
# url : 'https://yourcompany.litmus.com'
# applications : litmusClients
emailTest :
email : 'john.doe@mailinator.com'
subject : 'something'
files :
"example/dest/embedded_styles_inlined.html": "example/html/embedded_styles_inlined.html"
produce :
files : [
expand: true,
cwd: 'example/html'
src: ['**.html'],
dest: 'example/dest/'
]
options :
encodeSpecialChars : true
# Load local tasks.
grunt.loadTasks 'tasks'
# Load Npm Tasks
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-jshint'
grunt.loadNpmTasks 'grunt-contrib-nodeunit'
# Default task.
grunt.registerTask 'default', 'emailBuilder:produce'
grunt.registerTask 'test', ['jshint', 'clean', 'emailBuilder:produce', 'nodeunit']
grunt.registerTask 'litmus', ['jshint', 'clean', 'emailBuilder:test', 'nodeunit']
# https://yoursite.litmus.com/emails/clients.xml
litmusClients = [
'gmailnew'
'ffgmailnew'
'chromegmailnew'
'hotmail'
'outlookcom'
'ol2003'
'ol2007'
'ol2010'
'ol2011'
'ol2013'
'appmail6'
'iphone5'
'iphone4'
'ipad3'
];