@ideasonpurpose/gulp-task-clean

0.1.2 • Public • Published

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));

Readme

Keywords

none

Package Sidebar

Install

npm i @ideasonpurpose/gulp-task-clean

Weekly Downloads

0

Version

0.1.2

License

ISC

Unpacked Size

8.89 kB

Total Files

4

Last publish

Collaborators

  • joemaller