Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.
Chad Watson edited this page Jul 16, 2015 · 9 revisions

Welcome to the gulp-eta wiki!

Getting Started

Assuming you have Node installed...

1. Init package.json

Skip this step if you already have a package.json.

If you're starting a brand new project, you'll need an npm project manifest, package.json.

npm init

Follow the steps.

2. Install Gulp globally

Skip this step if you already have Gulp installed globally.

npm i gulp -g

3. Install Eta

npm i --save-dev gulp-eta

4. Create gulpfile.js

In your current working directory, create a file called gulpfile.js which serves as the configuration file for Gulp. Here is where you link up Eta. Eta adds tasks to your Gulp module.

One great thing is that you aren't limited to what Eta provides! You can declare your own custom tasks, too.

Your gulpfile should look something like this:

// dependencies
var gulp = require('gulp');
var eta = require('gulp-eta');

// instantiate eta passing in `gulp` as the first arg
// and then your configuration object as the second arg
eta(gulp, {
  // your options
});

// add some custom tasks if you want
gulp.task('mytask', function() {
  // blah blah blah
});

Checkout the examples for some common configurations.

5. Your choice

At this point you have three options.

1. You can either go ahead and run gulp init to use Eta's default configuration to setup your source files and install the necessary depencies.

2. You can pass in your own configuration to the Eta instance in gulpfile.js to meet your needs, then run gulp init to set up all of the source files where you need them.

3. You can skip gulp init and set up your project however you want. If you elect to go this route make sure to let Eta know where all of your source files are and where you want the compiled assets to be created using the [[scaffold|Configuration:-Scaffold]] option. Or else the Eta gulp tasks won't work.

Whatever route you take make sure you configure Eta to meet the needs of your project. Eta will not work without your [[scaffold|Configuration:-Scaffold]] being correctly configured.

6. Run the tasks

gulp

This will run the default gulp task, which has the following task dependencies: ['browserSync', 'symbols', 'sass', 'sprites', 'images', 'browserify'].

View all available tasks