npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gulp-display-help

v1.3.3

Published

Output beautiful custom help text for your gulp tasks and parameters

Downloads

8

Readme

gulp-display-help

Output beautiful custom help text for your gulp tasks and parameters.

  • Lets you make help text specific to your project's gulpfile - for both tasks and environment flags - which can then be accessed via the command line (e.g. 'gulp help').

  • Automatically generates and displays list of tasks. Tasks can be excluded if not wanted on the help list ('private'/'internal' tasks). Descriptions added to each task via the plugin.

  • "Usage" information displayed at the top.

  • Wraps and indents the help text, linux 'man' style.

Installation

npm install --save-dev gulp-display-help

Usage

gulp.task('help', displayHelp(gulp.tasks [, descriptions, excludes, flagDescriptions])

  • gulp.tasks must always be the first parameter.

  • descriptions {Object} format:

    { "taskname1": "taskDescription1", "taskName2": "taskDescription2", "etc": "etc"}

  • excludes {Array} format:

    ["taskToExcludeFromHelp1", "taskToExcludeFromHelp2", "item3", "item4", "etc"]

  • flagDescriptions {Object} format:

    {"--gulpCliParameter1": "gulpCliParameter1Description", "gulpParam2": "gulpDescription2", "--etc": "etc" }

Example

var displayHelp = require('gulp-display-help');

gulp.task('help', gulp.tasks, displayHelp(
  // For the below items, each key corresponds to a gulp task, & each value is its
  // definition in the gulp help output text. gulp tasks not defined stil appear in
  // the gulp help output (unless excluded -  see below), but without a definition.
  {
    default: '1) a) compiles app: converts NodeJS --> JS & concats it' +
             'all libs into a single js file; b) compiles SCSS --> CSS;' +
             ' c)compiles html templates; d) grabs static resources; & ' +
             'e) copies everything used into build folder.\n2)backs ' +
             'project up into separate local folder. \n3) watches src ' +
             'folder for changes, & auto-recompiles when a change occurs',

    'test': 'run jasmine tests, launch & test in a js runtime env with karma;',

    'backup': 'Backs up src files into a local folder',

    'help': 'displays this help text'

  // Exclude the below tasks from help output
  }, [ 
      _copy-images',
      '__watch',
      '__copy-libs',
      'compile-templates'
  ],

  // Command-line flags
  {
    "--production": 'full production-ready compile: same as default with a few changes: 1) ' +
                    'comments removed; 2) calls to js loggers removed; 3) dev-only sections of html' +
                    'removed; 4) production-only blocks of html uncommented; 5) *TODO* css, js, &' +
                    'html minified; & 6) Static resources compressed.',

    '--once': 'runs the compile only once, without watching for subsequent changes'

  }
));

Features automatic wrapping, indenting, and adjustment of definitions.

https://www.npmjs.com/package/gulp-display-help