Laravel Foundation Emails 2 integration
Last updated 3 years ago by dan-leech .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install laravel-elixir-foundation-emails 
SYNC missed versions from official npm registry.

Laravel Elixir Foundation Emails 2 Integration

This extension brings Foundation Emails 2 support to Laravel Elixir, version 6 and up.

Step 1: Install

npm install laravel-elixir-foundation-emails --save-dev

Step 2: Usage

The foundationEmails method may be used to compile email blade templates, sass, images into blade views.

elixir(function(mix) {

Default options are:

options = {
    sass: 'resources/assets/sass/emails/email.scss',
    source: 'resources/emails',
    views: 'resources/views/emails',
    images: 'resources/emails/images',
    imagesDist: 'public/images/emails',
    publicCss: 'public/css',
    compiled: 'resources/emails/dist'
  • `sass:` email.scss - compiled into email.css, saves to `compiled` and `publicCss`.
  • `source` blade emails folder before inky and inlining css
  • `views` destination - compiled templates for use in Laravel
  • `images` images folder before minifing
  • `imagesDist` images ready for use
  • `compiled` tmprorary folder

To choose a different options or rewrite one of them you can use method argument.

elixir(function(mix) {
        copiled: 'public/compiled/emails'

Or can use foundation-emails.config.js file in your project root. Example:

module.exports = {
     sass: 'resources/assets/sass/emails/email.scss',
     source: 'resources/emails',
     views: 'resources/views/emails',
     images: 'resources/emails/images',
     imagesDist: 'public/images/emails',
     publicCss: 'public/css',
     compiled: 'resources/emails/dist'

Step 3: Plugins

If you've created a plugin, and need to hook your own FoundationEmails config into Elixir's defaults, add the following to your script:

sass: 'resources/assets/sass/emails/email.scss',

Elixir.foundationEmails.mergeConfig(newConfig) will recursively merge your provided configuration with ours.


Current plugin freezes gulp flow until all it's works will be done. Because I can't find better way to run several streams in elixir gulp task without callback.

Css inliner removes all <link rel="stylesheet" type="text/css" href="*"> tags in production mode. To add styles to compiled styles in head put it into <style type="text/css" media="screen"></style in head. You can add @font-face and etc. Or correct bugs in compiled styles. Supports blade syntax as well.

Current Tags

  • 1.0.4                                ...           latest (3 years ago)

5 Versions

  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (18)
Dev Dependencies (2)
Dependents (0)

Copyright 2014 - 2016 © |