@types/gulp-util

  • Version 3.0.41
  • Published
  • 6.36 kB
  • 4 dependencies
  • MIT license

Install

npm i @types/gulp-util
yarn add @types/gulp-util
pnpm add @types/gulp-util

Overview

TypeScript definitions for gulp-util

Index

Variables

variable colors

const colors: any;

    variable date

    const date: {
    (now?: Date | string, mask?: string, convertLocalTimeToUTC?: boolean): any;
    masks: any;
    };

      variable env

      const env: any;

        variable linefeed

        const linefeed: string;

          variable noop

          const noop: any;
          • Returns a stream that does nothing but pass data straight through.

          Functions

          function beep

          beep: () => void;

            function buffer

            buffer: (cb?: (err: Error, data: any[]) => void) => NodeJS.ReadWriteStream;
            • This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects).

            function combine

            combine: {
            (streams: NodeJS.ReadWriteStream[]): () => NodeJS.ReadWriteStream;
            (...streams: NodeJS.ReadWriteStream[]): () => NodeJS.ReadWriteStream;
            };

              function isBuffer

              isBuffer: (obj: any) => boolean;

                function isNull

                isNull: (obj: any) => boolean;

                  function isStream

                  isStream: (obj: any) => boolean;

                    function log

                    log: (message?: any, ...optionalParams: any[]) => void;
                    • Logs stuff. Already prefixed with [gulp] and all that. Use the right colors for values. If you pass in multiple arguments it will join them by a space.

                    function replaceExtension

                    replaceExtension: (npath: string, ext: string) => string;
                    • Replaces a file extension in a path. Returns the new path.

                    function template

                    template: {
                    (tmpl: string): (opt: { file: { path: string } }) => string;
                    (tmpl: string, opt: { file: { path: string } }): string;
                    };
                    • This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the lodash docs for more info.

                    Classes

                    class PluginError

                    class PluginError implements Error, PluginErrorOptions {}

                      constructor

                      constructor(options?: PluginErrorOptions);

                        constructor

                        constructor(pluginName: string, options?: PluginErrorOptions);

                          constructor

                          constructor(
                          pluginName: string,
                          message: string | Error,
                          options?: PluginErrorOptions
                          );

                            property error

                            error: Error;

                              property fileName

                              fileName: string;

                                property lineNumber

                                lineNumber: number;

                                  property message

                                  message: any;
                                  • Can be a string or an existing error.

                                  property name

                                  name: string;
                                  • The module name of your plugin.

                                  property plugin

                                  plugin: string;

                                    property showProperties

                                    showProperties: boolean;
                                    • Error properties will be included in err.toString(). Can be omitted by setting this to false.

                                    property showStack

                                    showStack: boolean;
                                    • By default the stack will not be shown. Set this to true if you think the stack is important for your error.

                                    property stack

                                    stack: string;
                                    • You need to include the message along with this stack. If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.

                                    Interfaces

                                    interface PluginErrorOptions

                                    interface PluginErrorOptions {}

                                      property error

                                      error?: Error | undefined;

                                        property fileName

                                        fileName?: string | undefined;

                                          property lineNumber

                                          lineNumber?: number | undefined;

                                            property message

                                            message?: any;
                                            • Can be a string or an existing error.

                                            property name

                                            name?: string | undefined;
                                            • The module name of your plugin.

                                            property plugin

                                            plugin?: string | undefined;

                                              property showProperties

                                              showProperties?: boolean | undefined;
                                              • Error properties will be included in err.toString(). Can be omitted by setting this to false.

                                              property showStack

                                              showStack?: boolean | undefined;
                                              • By default the stack will not be shown. Set this to true if you think the stack is important for your error.

                                              property stack

                                              stack?: string | undefined;
                                              • You need to include the message along with this stack. If you pass an error in as the message the stack will be pulled from that, otherwise one will be created.

                                              Package Files (1)

                                              Dependencies (4)

                                              Dev Dependencies (0)

                                              No dev dependencies.

                                              Peer Dependencies (0)

                                              No peer dependencies.

                                              Badge

                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/gulp-util.

                                              • Markdown
                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/gulp-util)
                                              • HTML
                                                <a href="https://www.jsdocs.io/package/@types/gulp-util"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>