-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6effe94
commit 4804cb4
Showing
6 changed files
with
100 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
|
||
|
||
|
||
<table class="button " align="left"> | ||
<tr> | ||
<td> | ||
|
@@ -28,6 +29,7 @@ | |
|
||
|
||
|
||
|
||
</center> | ||
</td> | ||
</tr> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,38 @@ module.exports = function(grunt) { | |
}] | ||
} | ||
}, | ||
litmus: { | ||
test: { | ||
src: ['dist/output/example.html'], | ||
options: { | ||
username: 'username', | ||
password: 'password', | ||
url: 'https://yourcompany.litmus.com', | ||
clients: ['gmailnew', 'ffgmailnew', 'chromegmailnew'] | ||
} | ||
} | ||
}, | ||
nodemailer: { | ||
options: { | ||
transport: { | ||
type: 'SMTP', | ||
options: { | ||
service: 'Gmail', | ||
auth: { | ||
user: '[email protected]', | ||
pass: 'tamere123!' | ||
} | ||
} | ||
}, | ||
recipients: [ | ||
{ | ||
email: '[email protected]', | ||
name: 'Jane Doe' | ||
} | ||
] | ||
}, | ||
src: ['dist/output/*.html'] | ||
}, | ||
watch: { | ||
options: { | ||
livereload: true | ||
|
@@ -75,9 +107,14 @@ module.exports = function(grunt) { | |
grunt.loadNpmTasks('grunt-email-builder'); | ||
grunt.loadNpmTasks('grunt-nunjucks-2-html'); | ||
grunt.loadNpmTasks('grunt-email-builder'); | ||
grunt.loadNpmTasks('grunt-litmus'); | ||
grunt.loadNpmTasks('grunt-nodemailer'); | ||
|
||
grunt.registerTask('default',['watch']); | ||
grunt.registerTask('buildcss',['sass']); | ||
grunt.registerTask('buildhtml',['nunjucks','emailBuilder']); | ||
grunt.registerTask('css',['sass']); | ||
grunt.registerTask('html',['nunjucks','emailBuilder:inline']); | ||
grunt.registerTask('build',['sass','nunjucks','emailBuilder:inline']); | ||
grunt.registerTask('sendlitmus',['litmus:test']); | ||
grunt.registerTask('email',['nodemailer']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ You have now everything you need to use inker. There is template examples in src | |
* grunt css *- Build CSS* | ||
* grunt html *- Build HTML templates* | ||
* grunt build *- Build css & html* | ||
* grunt email *- Send a test email to any email inbox* | ||
* grunt litmus *- Send a test email to litmus* | ||
|
||
## CSS with Inker | ||
|
@@ -87,6 +88,52 @@ button('button-green', 'left', 'http://www.google.com', 'Go to google'); | |
|
||
**When creating new components remember to add them to the base.html file situates in _src/html-components_** | ||
|
||
### Inker with your back-end templating engine & application | ||
|
||
Inker is specially thought so it integrate with your back-end application, Inker templating engine use <# #> so it does not interfere with others templating engine making it possible to test your templates with inker & then use your back-end to place data & send your email. | ||
|
||
### Inker with dynamic custom data | ||
|
||
Inker can use json files as a source of dynamic data, an use example would be to test product loops. Of course this means that if you get that data from a back-end api you will need to replace the loop system to match your templating engine after. | ||
|
||
This is a built-in feature of grunt-nunjucks-2-html, please see their documentation for more information about customization. | ||
|
||
|
||
|
||
## Sending test email to your inbox | ||
|
||
Inker use grunt-nodemailer to send test. By default it send a test for all files that are in the output folders, you can easily change that in **gruntfile.js**. However a better way touse it would be to change the path directly from the grunt command. | ||
|
||
```bash | ||
// Override default src provided in gruntfile | ||
grunt email --fileSrc=dist/output/example.html | ||
``` | ||
|
||
Config example: | ||
```javascript | ||
nodemailer: { | ||
options: { | ||
transport: { | ||
type: 'SMTP', | ||
options: { | ||
service: 'Gmail', | ||
auth: { | ||
user: '[email protected]', | ||
pass: 'BLAH' | ||
} | ||
} | ||
}, | ||
recipients: [ | ||
{ | ||
email: '[email protected]', | ||
name: 'Jane Doe' | ||
} | ||
] | ||
}, | ||
src: ['dist/output/*.html'] | ||
}, | ||
``` | ||
|
||
## Contributions | ||
|
||
I am always happy to accept contributions, but please follow ITCSS guidelines & please test your new components or fixes in most used email clients. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters