0.1.2 • Published 5 years ago

@ideasonpurpose/gulp-task-clean v0.1.2

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

npm.io dependencies Status code style: prettier

Gulp Task: Clean

Create a very simple pre-configured Gulp 4 task to remove files. Most often used to clear generated artifacts before starting a new build.

Installation

$ yarn add @ideasonpurpose/gulp-task-clean

  or

$ npm install @ideasonpurpose/gulp-task-clean

Usage

Basic

Call the create method directly on the import. In most cases, just trust the defaults and go:

const clean = require("@ideasonpurpose/gulp-task-clean").create();

// Export to make the task publicly callable
exports.clean = clean;

Custom options

The create method accepts one configuration object. This module accepts one property:

  • target
    A glob string or array of glob-strings. Defaults to dist Passed directly to del

Example use

An example which cleans both the dist directory and all *.zip files from snapshots before running a build task might look like this:

const gulp = require("gulp");
const clean = require("@ideasonpurpose/gulp-task-clean").create({
  target: ["dist", "snapshots/**/*.zip"]
});

// Run this in series as part of a pipeline and only the one build task
exports.build = gulp.series(clean, gulp.parallel(styles, imaagemin));
0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago