0

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?

automatix
  • 14,018
  • 26
  • 105
  • 230

1 Answers1

0

Put in your gulpfile.js:

gulp.task('less', function () {
  // as you wish
})
Arthur Ronconi
  • 2,290
  • 25
  • 25