stomt / gulp-modular

Boilerplate gulp tasks for quick project setup.
MIT License
10 stars 0 forks source link

How to overwrite tasks? #42

Open maxklenk opened 8 years ago

maxklenk commented 8 years ago

I tried to overwrite a task by adding something like this to my local gulpfile.js:

// OVERWRITE: custom index task
var extend = require('extend'),
  gulpInject = require('gulp-inject'),
  minifyInline = require('gulp-minify-inline'),
  minifyHtml = require('gulp-minify-html'),
  preprocess = require('gulp-preprocess'),
  _ = require('underscore');

function customtIndex(gulp, config) {
  function injectIndex() {
   ...
  }

  gulp.task('index', tasks, injectIndex);
}

customtIndex(gulp, config);

Multiple problems result of doing so:

How to do it better?

sebastianhenneberg commented 8 years ago

Where exactly are the import of gulp-modular and the initial call of gulp-modular located?

maxklenk commented 8 years ago

They have been further up the file, my overwrite was located at the very end of the gulpfile.js.