Emit clean, readable log messages from gulp tasks
npm install gulp-messagejavascript
const message = require('gulp-message');
`
Typescript / ES6:
`typescript
import * as message from 'gulp-message';
`
Types are bundled with the published package and will be automatically imported.
$3
`javascript
gulp.task('foo', () => {
message.warn(Well that's not quite right...);
});
`
API
$3
Emit an error message.
$3
Emit an warning message.
$3
Emit an info message.
$3
Emit an debug message.
$3
Create a custom log emitter.
Option | Description | Default
------- | ------------------------------------------------- | ---------
prefix | A prefix to append to all outgoing messages - either a string, or [string, style] tuple | ''
style | The style to apply to the message body | none
writer | The log message emitter | gutil.log
Example:
`javascript
const tableFlip = message.logger({
prefix: '(ノಠ益ಠ)ノ彡┻━┻'
})
tableFlip('Breath in, breath out.')
=> '(ノಠ益ಠ)ノ彡┻━┻ Breathe in, breathe out.'
``