🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

@marknotton/gulp-tasks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marknotton/gulp-tasks

A private collection of Gulp tasks commonly used within internal projects.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
5
-76.19%
Maintainers
1
Weekly downloads
 
Created
Source

Notifier

Made For NPM Made For Gulp

Manage CLI and popup notification messages.

Installation

npm i @marknotton/notifier --save-dev
const notifier = require('@marknotton/notifier');

Usage

gulp.task('someTask', () => {
  return gulp.src([...])
  .pipe(plumber({errorHandler: notifier.error }))
  .pipe(concat('ccombined.js))
  .pipe(gulp.dest('/some/location/'))
  .pipe(notifier.success())
});

Options

OptionTypeDefaultDetails
projectString-Project name. Will appear as a subheading
exclusionsString-Files that match any part of this string will be excluded from any notification
prefixString-String to add before the notification message
suffixString-String to add after the notification message
popupsBooltruePrevent popups from showing. Console logs will still be rendered. Remote servers won't need popups and may even cause errors.
successStringSuccessIcon to use on success messages. Can be relative to the project folder or an absolute URL
errorStringSuccessIcon to use on error messages. Can be relative to the project folder or an absolute URL
messagesStringFiles compiled successfullyThe message you want to display. This can be a shorthand name that references an object key defined in the defaults function (see below)
extraArray/String-Manually add extra files to log out, regardless of whether they are actually part of the stream

A string will be defined as the message or message shorthand.

notifier.success('js', { project : 'My Project', ...})

Notice the use of a shorthand name as the first parameter. This will look for the keys in the default settings object. So you can list all your messages in one place.

Defining your default settings

You can preset the above options with the settings function. This will be refereed as your default options for every notifier instance.

notifier.settings({
  project : 'My Project,
  success : 'images/icon.png',
  exclusions:'.map',
  messages  : {
    js      : 'Javascripts are all done!',
    sass    : 'Looking gooooood!'
  }
});

Keywords

gulp-tasks

FAQs

Package last updated on 14 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts