@hugsmidjan/gulp-utils
v0.1.3
Published
Misc utils for gulp task
Downloads
8
Readme
@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');