dwightjack / grunt-email-boilerplate Goto Github PK
View Code? Open in Web Editor NEWA Grunt template to create emails
License: MIT License
A Grunt template to create emails
License: MIT License
Have you thought about porting the premailer task as a stand alone grunt plugin? It'd be pretty nice.
I think your project is a good candidate to make a Yeoman generator.
Add juice engine for inline styling
This one is just nice to have. 'grunt-email-builder' implements it for those wanting to fire their emails off to litmus.com for cross-client testing. If it could be integrated here, that'd be like putting the cherry on top.
Hi, Thank you this is a wonderful workflow, however i am just trying to use the grunt send function but keep getting this error:
Running "premailer:dev_html" (premailer) task
C:/Ruby193/lib/ruby/gems/1.9.1/gems/premailer-1.8.2/lib/premailer/adapter/nokogiri.rb:142:in write_unmergable_css_rules': undefined method
children' for nil:NilClass (NoMethodError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/premailer-1.8.2/lib/premailer/adapter/nokogiri.rb:90:in to_inline_css' from C:/Code/newsletters/globalgeorgia/grunt-email-boilerplate/node_modules/grunt-premailer/lib/premailer.rb:104:in
write_unmergable_css_rules': undefined method
children' for nil:NilClass (NoMethodError)to_inline_css' from C:/Code/newsletters/globalgeorgia/grunt-email-boilerplate/node_modules/grunt-premailer/lib/premailer.rb:104:in
'
Any Help Would Be Great Thanks!
Test task sometimes fails at img:dist
Trace:
Running "clean:dist" (clean) task
Folder "dist20130215" contents removed.
Running "img:dist" (img) task
** Processing: src/images/cornicebottom.jpg
Output file: dist20130215/images/cornicebottom.jpg
Uncompressed size: 6695 bytes.
Compressed size: 6669 bytes minified.
stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: EIO, open 'dist20130215/images/cornicebottom.jpg'
grunt dev
Loading "Gruntfile.js" tasks...ERROR
Error: Unable to read "config/nodemailer-transport.json" file
When you run the dist task with grunt dist
, it doesn't inline your css.
Apparently, this is because the path to the css file is wrong.
To solve it, you need to change the line 20 of src/email.html
like that
<link rel="stylesheet" type="text/css" href="css/style.css"/>
When running grunt dev
for the first time.
Is, or should some sort of nodemailer configuration be required to start working on templates?
Fatal error: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:454:in parse': invalid argument: --base-url (OptionParser::InvalidArgument) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:326:in
parse_arg'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:454:in parse' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1266:in
parse_in_order'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in catch' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1254:in
parse_in_order'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1248:in order!' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1339:in
permute!'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/optparse.rb:1360:in `parse!'
from vendor/premailer-parser.rb:67
Hi on windows 7 x64 i'm getting this error
grunt-email-boilerplate [master]> grunt dist
Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read "config/nodemailer-transport.json" file (Error code: ENOENT).
Warning: Task "dist" not found. Use --force to continue.
Aborted due to warnings.
am i missing some package or something ?
Should test Ink as alternative boilerplate
The premailer task fails to inline css files when they are linked with an absolute path.
Scenario
<link rel="stylesheet" type="text/css" href="/css/style.css"/>
premailer.dist.options.base_url
set to a remote URL (http://www.live-site.com/
)http://www.live-site.com/css/style.css
)Since the file doesn't exist, premailer is unable to parse and inline it
Best solution would be to explicitly add an option in the task to include the CSS file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.