Setting up Gulp and Elixir

Elixir is new in Laravel 5.x and is a wrapper around Gulp, which is a well-known JavaScript build system. We will use it to manage assets later on in the book. For now, we just want to get it installed.

How to do it...

  1. SSH into Homestead:
    >homestead ssh
    >cd ~/Code/recipes
  2. Install Gulp using the following:
    >npm install
  3. When it is done, try the following:
    > node_modules/gulp/bin/gulp.js -v

How it works...

Once again, Homestead is making our work easier; NPM is already installed! So, we can use this to not only install Gulp but also other JavaScript libraries that we need. How to do this? If you look into the Laravel application that we downloaded, you will now see the =package.json file:

This is the file that NPM uses, just as ...

Get Laravel 5.x Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.