Is it possible / How to run gulp modules directly?

82 views Asked by At

It would make sense for me to use some of gulp modules/plugins independently. E.g.: I have installed gulp-less globally (npm install --global gulp-less) and want to use it instead of lessc in the manner like grunt-less -options ./my/css/folder or grunt less -options ./my/css/folder. But my attempt end with an error message:

$ gulp less ./css/
Using gulpfile ~/temp/gulptest/gulpfile.js
Task 'less' is not in your gulpfile
Please check the documentation for proper gulpfile formatting

Ideally I also would like to use gulp plugins outside of any project as independent tools.

How to run gulp modules outside of the build context?

If this option is not provided: Is there a workaround?

1

There are 1 answers

0
Arthur Ronconi On

Put in your gulpfile.js:

gulp.task('less', function () {
  // as you wish
})