gulp-displaylog

1.0.3 • Public • Published

gulp-displaylog

by ilex.h

default use

Image text

onlyPath

Image text

Install

$ npm install --save-dev gulp-displaylog

Usage

const gulp = require('gulp');
const displaylog = require('gulp-displaylog');
 
gulp.task('default', () =>
    gulp.src('*.js')
        .pipe(displaylog({title: 'amosg'}))
        .pipe(gulp.dest('dist'))
);
gulp.task('some', () =>
  gulp.src('*').pipe(displaylog({
    title: 'amos',
    isRelative: false
  })));

use logger

const displaylog = require('gulp-displaylog');
 
const logger = displaylog.logger;
 
logger('hello'); // console.log
logger.info('hello'); // console.info
logger.dir('hello'); // console.dir
logger.warn('hello'); // console.warn
logger.error('hello'); // console.error
 
 

API

displaylog([options])

options

name type default description
title string amos-displaylog: Give it a custom title so it's possible to distinguish the output of multiple instances logging at once.
isRelative boolean true By default only relative paths are shown. Turn off isRelative mode to also show cwd, base, path. The stat property will be shown when you run gulp in verbose mode: gulp --verbose.
onlyPath boolean true only when isRelative is false, then onlyPath will worked. if onlyPath is true, will show full path, or show cwd、base、path
showFiles boolean true Setting this to false will skip printing the file names and only show the file count.

changelog

  • 2019-1-9 v1.0.3

    1. -gulplog
    2. add custom logger
  • 2018-12-17 v1.0.2

    1. -gulp-util
    2. +gulplog
    3. update gulp@4.0.0

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i gulp-displaylog

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

106 kB

Total Files

8

Last publish

Collaborators

  • ilex.h