0.1.3 • Published 5 years ago

@hugsmidjan/gulp-utils v0.1.3

Weekly downloads
6
License
ISC
Repository
github
Last release
5 years ago

@hugsmidjan/gulp-utils

npm install --save-dev @hugsmidjan/gulp-utils

Usage

const [cssBundlem, cssWatch] = require('@hugsmidjan/gulp-utils')(opts);

API / Advanced usage

const {
  prefixGlobs, // (globs: string[], src: string) => string[]
  // Takes an array of src-relative globs and prefixes them with src

  normalizeOpts, // <D = {}>(userOpts: {}, defaultOpts: D) => D
  // Shallow merges userOptions with defaultOpts.
  // Normalizing scr, dist, glob

  notifyError, // (error: string | { message: string; [key: string]: any }) => void
  // Sends the error.message to node-notifier to pop a toast message

  notifyPipeError, // () => GulpPlumberInstance
  // Feeds plumber event to `notifyError`
  // Usage:  `src(glob).pipe(notifyPipeError())`.

  gulpReplace, // shortcut to the `gulp-replace` module

  makeDir, // (path: string, stripFileName: boolean) => void
  // Thin wrapper around `mkdirp.sync` with optional fileName stripping

} = require('@hugsmidjan/gulp-utils');