Getting started

The first step is to install Node.js if it is not already installed on the development computer.

Note

Instructions can be found at the following URL:

https://nodejs.org

Installing Node.js

With a Debian-based operative system such as Ubuntu, installing Node.js could be as simple as using the apt package manager. From the command line, use the following command:

$ sudo apt-get install -y nodejs

Please refer to the installation instructions for the correct operating system from the Node.js website (https://nodejs.org).

Installing the Node.js package manager

The next step involves installing gulp, which Elixir will use to run its tasks. For this step, the Node.js package manager (npm) is required. If npm is not already installed, then the apt package installer is to be use. The following command will be used to install npm:

$ sudo apt-get install npm

The npm uses a json file to manage the project's dependencies: package.json. This file is found in the root of the Laravel project directory and has the following format:

{
  "devDependencies": {
    "gulp": "^3.8.8",
    "laravel-elixir": "*"
  }
}

Gulp and Laravel Elixir are installed as dependencies.

Installing Gulp

The following command is used to install gulp:

$ sud onpm install --global gulp

Installing Elixir

Once Node.js, npm, and gulp are installed, the next step is to install Laravel Elixir. By running npm install without any arguments, npm will read its configuration file and Laravel Elixir will be installed:

$ npm install
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset