Painless Builds With Elixir
Laravel Elixir takes the yawn out of writing your Gulpfiles. Why spends hundreds of lines writing what can be accomplished with just a few?
Updated Series Available
You are viewing an archived course. We instead recommend that you watch Learn Laravel Mix.
Progress
Series Info
- Episodes
- 15
- Run Time
- 1h 37m
- Difficulty
- Intermediate
- Last Updated
- May 13, 2016
- Version
- Latest
Series Episodes
- Episodes (15)
Initial Setup
Before we can toy around with Elixir, we first need to install the required tools.Sass and Less Compilation
It's never been easy to write and compile Sass (or Less, if you prefer) in a project. Let's go over the details.CoffeeScript and ES6 Support
When it comes to JavaScript, Elixir provides lots of options! Enjoy using CoffeeScript? No problemo. What about using the latest features that EcmaScript 6 and 7 have to offer? Easy! One line of code will do it.Sourcemaps
Elixir offers sourcemap support out of the box. This means, when debugging in the browser, rather than reviewing some foreign compiled script or stylesheet, you can instead dig directly into the original Sass partial, or JavaScript module. How cool is that!?Gulp Watch
Manually runninggulpcan get tedious really fast. Instead, opt for the usefulgulp watchcommand to keep an eye on your files for changes.Concatenation
Easily, one of the most frequent tasks that you'll need to perform, as part of your build process, is file concatenation. Whether you need to merge some scripts or stylesheets, Elixir makes it a cinch!Gulp TDD
If you'd like to trigger your PHPUnit or PHPSpec tests with Gulp, then thegulp tddTerminal command will be your best friend!File Versioning
Aggressive caching on your production server is a useful technique to improve the performance of your app. But what about when we want to bust that cache? Do we really have to manually update a querystring on a file path? Nope! There's an easier way.Browserify Compilation
With a vanilla Gulpfile, hooking into Browserify can be a bit of a pain. It takes lots and lots of research to figure out how to apply the necessary transformations and such. With Elixir, it's as simple as a single method call!Everybody Together Now
Let's use all the techniques we've learned to build a Gulpfile for a simple, yet typical web application.Custom Elixir Extensions
What about the situations, where you need to call a custom Gulp task of yours? Or what if you even want to extend Elixir, itself? I'll show you how in this lesson.Configuring Elixir
Whenever possible, stick with the Elixir conventions. However, sometimes, you have no choice. Maybe you require a different public folder name. Or maybe all of your assets should instead be stored in the "app/assets" directory. In this lesson, you'll learn to override the default configuration.Browsersync in Action
Laravel Elixir 3.3 includes Browsersync support straight out of the box. This means, with minimal effort, you can modify a view or piece of styling, and instantly watch your browser update to reflect the changes!Painless Responsive Workflow
We reviewed Browsersync in the previous episode, but I want to impress upon you how useful this tool can be, when optimizing your sites for various devices. Wouldn't it be nice if you could, in real-time, review a page's layout for desktops, tablets, and phones? Even better, wouldn't it be cool if they were all in sync with one another?Laravel Elixir Extension From Scratch
In this episode, we'll, from scratch, create a custom Laravel Elixir extension that allows us to integrate Webpack into our build process.
