1.0.3 • Published 5 years ago

gulp-displaylog v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

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

nametypedefaultdescription
titlestringamos-displaylog:Give it a custom title so it's possible to distinguish the output of multiple instances logging at once.
isRelativebooleantrueBy 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.
onlyPathbooleantrueonly when isRelative is false, then onlyPath will worked. if onlyPath is true, will show full path, or show cwd、base、path
showFilesbooleantrueSetting 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