gulp-help icon indicating copy to clipboard operation
gulp-help copied to clipboard

Support for gulp 4.0

Open nmccready opened this issue 9 years ago • 17 comments

Looks like help bombs out on gulp4. Anyplans to support this? I am pretty familiar with 4.0 and can help out.

nmccready avatar Sep 14 '15 16:09 nmccready

You are correct. I was waiting on gulp4 to officially land before doing anything but you can see someone else's first stab at support here: https://github.com/chmontgomery/gulp-help/pull/19

That PR is kinda rough though, so feel free to create a newer, cleaner PR or expand on what he did. Ideally the gulp4 version will support all the same features gulp-help does today in v1.6.1

chmontgomery avatar Sep 14 '15 16:09 chmontgomery

Ideally the gulp4 version will support all the same features gulp-help does today in v1.6.1

Yeah that would be sweet

I have been using gulp 4 for about 6 months and it has been very stable for a long time. It is also much easier to use then the old version. But if you think the help will be pre-bundled then I don't see a reason to work on this. Maybe PR a change directly to gulp4 itself with help in it I suppose.

nmccready avatar Sep 14 '15 16:09 nmccready

sorry, what I meant was I don't want to lose any functionality in this module. From all I've read about gulp4 it doesn't seem they plan to implement any help beyond gulp --tasks-simple which doesn't allow for descriptions.

You can try to create a PR against gulp4 directly however I think they're mantra of simplicity will keep a feature like that out. I still think this module will stick around for people that want a more robust help menu.

I just created a gulp4 branch in this repo we can start contributing to. Feel free to make PRs against it.

Thanks!

chmontgomery avatar Sep 14 '15 16:09 chmontgomery

cool ty

nmccready avatar Sep 14 '15 16:09 nmccready

I created a new API doc. Take a look and let me know what you think: https://github.com/chmontgomery/gulp-help/blob/gulp4/docs/API.md

Trying to figure out the best way to structure the API that will be intuitive and useful to people.

chmontgomery avatar Sep 15 '15 00:09 chmontgomery

made some further progress today. I now have descriptions displaying using gulp's built-in convention for supplying descriptions (see latest on gulp4 branch)

screen shot 2015-09-16 at 10 49 19 pm

Supporting this way does have the benefit of having gulp-help be droppable into any gulpfile.js and just "work". Also gulp --tasks will work. However, I still hope to also support my new task API since defining help text against the function directly seems clunky to me.

chmontgomery avatar Sep 17 '15 03:09 chmontgomery

Cool stuff:

However, I did just notice this may be wrapped into gulp4 anyway and we might not need this lib anymore.

╰─○ gulp --help
[21:27:10] Requiring external module coffee-script/register

Usage: gulp [options] tasks

Options:
  --help, -h       Show this help.                           [boolean]
  --version, -v    Print the global and local gulp versions.
                                                                       [boolean]
  --require        Will require a module before running the gulpfile. This
                   is useful for transpilers but also has other applications.
                                                  [string]
  --gulpfile       Manually set path of gulpfile. Useful if you have
                   multiple gulpfiles. This will set the CWD to the gulpfile
                   directory as well.                              [string]
  --cwd            Manually set the CWD. The search for the gulpfile, as
                   well as the relativity of all requires will be from here.
                                                  [string]
  --verify         Will verify plugins referenced in project's package.json
                   against the plugins blacklist.
  --tasks, -T      Print the task dependency tree for the loaded gulpfile
                   .                                              [boolean]
  --tasks-simple   Print a plaintext list of tasks for the loaded gulpfile
                   .                                              [boolean]
  --tasks-json     Print the task dependency tree, in JSON format, for the
                   loaded gulpfile.
  --color          Will force gulp and gulp plugins to display colors, even
                   when no color support is detected.             [boolean]
  --no-color       Will force gulp and gulp plugins to not display colors,
                   even when color support is detected.           [boolean]
  --silent, -S     Suppress all gulp logging.                [boolean]
  --continue       Continue execution of tasks upon failure.
                                                                       [boolean]
  --log-level, -L  Set the loglevel. -L for least verbose and -LLLL for
                   most verbose. -LLL is default.                   [count]

Notice --task-simple and --tasks

Saw this here, https://github.com/gulpjs/gulp/issues/1159

nmccready avatar Oct 02 '15 01:10 nmccready

@nmccready yes and no. yes, --tasks-simple and --tasks exist, but they only allow for documenting descriptions. I'm currently trying to expand that to documenting flags and perhaps a whole custom function for displaying tasks via this issue: https://github.com/gulpjs/gulp-cli/issues/39

Depending on how all that shakes out, this repo could still be relevant or morph into the gulp4 way. Too early to tell yet.

chmontgomery avatar Oct 02 '15 04:10 chmontgomery

@chmontgomery I just tried the gulp4 branch, but the description doesn't appear in gulp help. I used your exact example with the clean task (setting the description property of the clean() function).

tony19 avatar Jan 10 '17 00:01 tony19

@tony19 you need #47 for it to work properly

akrawchyk avatar Sep 13 '18 15:09 akrawchyk

Any news with this one?!

https://github.com/gae-init/gae-init/pull/1037

lipis avatar Dec 23 '18 14:12 lipis

Just merged #47 . all examples are working now on the gulp4 branch

chmontgomery avatar Dec 24 '18 13:12 chmontgomery

So waiting for the release now.

lipis avatar Dec 26 '18 14:12 lipis

@lipis I don't have any plans for a "release". gulp 4 support only exists on a branch here in git. What's published to npm is the master branch, i.e. the version that works for gulp 3. You can do the following to reference gulp-help for gulp 4:

npm install --save-dev chmontgomery/gulp-help#gulp4

chmontgomery avatar Dec 26 '18 15:12 chmontgomery

Github has rate limiting, so having this only installable via github causes issues for busy CICD pipelines. We've definitely been bit by having non-NPM dependencies in the past. Might you reconsider publishing this as a new major version or with a new name?

DullReferenceException avatar Jan 29 '19 21:01 DullReferenceException

Now that gulp installs the 4.x version by default now, it would make sense to have a new major release with the default support being for gulp 4.

mrkmiller avatar Feb 11 '19 20:02 mrkmiller

Can we make a new release to support Gulp 4?

lipis avatar Jul 23 '19 19:07 lipis