-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the gulp-eta wiki!
Assuming you have Node installed...
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.
Skip this step if you already have Gulp installed globally.
npm i gulp -g
npm i --save-dev gulp-eta
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.
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.
gulp
This will run the default
gulp task, which has the following task dependencies: ['browserSync', 'symbols', 'sass', 'sprites', 'images', 'browserify']
.