Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-help#gulp4 not working with gulp 4.0.2 #52

Open
gad0lin opened this issue Sep 19, 2019 · 1 comment
Open

gulp-help#gulp4 not working with gulp 4.0.2 #52

gad0lin opened this issue Sep 19, 2019 · 1 comment

Comments

@gad0lin
Copy link

gad0lin commented Sep 19, 2019

#gulpfile
const gulp = require('gulp-help')(require('gulp'));
gulp.task('plist', 'list processes', async function () {
console.log('Hello World')
});

#package.json

{
"name": "hello",
"version": "1.0.0",
"description": "JHello",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"engines": {
"node": "~12.10.0"
},
"keywords": [
"hello"
],
"author": "kb",
"license": "N/A",
"dependencies": {
"gulp": "^4.0.2",
"gulp-help": "https://github.com/chmontgomery/gulp-help.git#gulp4"
}
}

error

assert.js:373
throw err;
^

AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (node_modules/undertaker/lib/task.js:13:8)
at Gulp.gulp.task (node_modules/gulp-help/index.js:40:33)
at Object. gulpfile.js:2:6)
at Module._compile (internal/modules/cjs/loader.js:936:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
at Module.load (internal/modules/cjs/loader.js:790:32)
at Function.Module._load (internal/modules/cjs/loader.js:703:12)
at Module.require (internal/modules/cjs/loader.js:830:19)
at require (internal/modules/cjs/helpers.js:68:18) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}

node version 12.10.0

@gad0lin gad0lin changed the title gulp-help#4 not working with gulp 4.0.2 gulp-help#gulp4 not working with gulp 4.0.2 Sep 19, 2019
@echernyavskiy
Copy link

Workaround:

(() => {
  let myTask = () => {
    return gulp
      .src(['*'], {allowEmpty: true})
      .pipe(foo());
  };
  myTask.description = 'This is my task.';

  gulp.task('my-task', myTask);
})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants