Comments (8)
My fault! I cloned but forgot to switch to a proper branch, so it was actually 3.9 :)
Taking this into work, thank you for contribution!
from gulp-help-doc.
Fixed in release v1.0.5
from gulp-help-doc.
Thanks, I will investigate this ASAP
from gulp-help-doc.
I see no problem with gulp4.
First of all, gulp v4 is unstable and is not released yet, but nevermind(I cloned their 4.0 branch for test).
Second, the code you provided is incorrect as far as gulp task requires it's name as first argument.
And third, when the code is correct everything works as expected.
In your case it would be
/**
* Something
* @task {sth}
*/
gulp.task('sth', function sth(done) {
done();
});
/**
* Prints this info.
* @task {help}
*/
gulp.task('help', function help(done) {
require('gulp-help-doc')(gulp);
done();
});
from gulp-help-doc.
Thank you for your respone.
However, the Changelog says:
added single argument syntax for gulp.task which allows a named function to be used as the name of the task and task function.
So the syntax I had posted is valid and works for me.
I suppose you have gulp 3 installed globally and that is the reason of not understanding the new syntax. Try
npm rm -g gulp
npm install -g gulp-cli
(only the cli should be installed globally).
from gulp-help-doc.
I don't have any modules installed globally. I have my PATH refering local ./node_modules/.bin, so I never install globally anything.
Gulp v4 is not released, and the thing I cloned from their v4 branch throws an error:
Error: Task requires a name that is a string
at Gulp.Orchestrator.add (/home/mikhus/Projects/test/node_modules/gulp/node_modules/orchestrator/index.js:41:10)
at Object.<anonymous> (/home/mikhus/Projects/test/gulpfile.js:22:6)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Liftoff.handleArguments (/home/mikhus/Projects/test/node_modules/gulp/bin/gulp.js:116:3)
As you may see from a stack trace it is not global reference.
All kind regards,
Mike
from gulp-help-doc.
It's weird then. Can you please try installing the gulp v4 with npm install 'gulpjs/gulp.git#4.0' --save-dev
?
from gulp-help-doc.
OK
from gulp-help-doc.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-help-doc.