gulp-log2
v0.1.3
Published
Support for simple log statements in the gulp pipeline
Downloads
20
Maintainers
Readme
gulp-log2
Pipe-inlined logging for
gulp
Install
$ npm install --save-dev gulp-log2
Usage
var gulp = require('gulp');
var log = require('gulp-log2');
gulp.task('default', function () {
return gulp.src('foo.js')
.pipe(log('starting the pipeline!'))
.pipe(gulp.dest('dist'));
});
API
log(message, options)
message
Type: string
Log message to display.
options
title
Type: string
Default: 'gulp-log'
Use a custom title to make it easier to distinguish where messages are logged from.
level
Type: string
Default: 'info'
The output level for the log message. Each level has an associated color provided by Chalk:
'fatal'
: bgRed'error'
: red'warn'
: yellow'info'
: green'debug'
: blue
log.levels[]
Associative array of output levels and colors. Custom levels can be added here.
Colors are provided by Chalk, and should be set like so:
var chalk = require('chalk');
log.levels['custom'] = chalk.magenta.underline;