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:
Dependencies which are only specified in gulp-modular will be installed in node_modules/gulp-modular/node_modules and therefore can't be imported with require().
I can pass the local config file, but it was not yet merged with the default config, so some keys are missing.
I tried to overwrite a task by adding something like this to my local
gulpfile.js
:Multiple problems result of doing so:
node_modules/gulp-modular/node_modules
and therefore can't be imported withrequire()
.How to do it better?