Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-delete-file

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

gulp-delete-file

gulp plugin to delete matched file based on RegExp Obj

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
452
decreased by-23.39%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-delete-file

Usage

Initially, install gulp-delete-file as a development dependency:

npm install --save gulp-delete-file

Then, create task using gulp-delete-file, which might look similar as below:

'use strict';
var gulp = require('gulp'),
	deletefile = require('gulp-delete-file');
gulp.task('deletefile', function () {
	var regexp = /\w*(\-\w{8}\.js){1}$|\w*(\-\w{8}\.css){1}$/;
	gulp.src(['./build/public/train/**/*.js',
		'./build/public/train/**/*.css',
		'./build/public/train/**/*.scss',
		'./build/public/train/**/*.less'
	]).pipe(deletefile({
		reg: regexp,
		deleteMatch: false
	}))
});

Finally, fire gulp task:

gulp deletefile

API

reg:is a RegExp Object

deleteMatch:if the value is 'true',then the command will delete all the files which match the reg-rule. if it is 'false',then delete all the files which doesn't match the reg-rule.

before Usage

├── _common
│   ├── bridge
│   ├── hybrid
│   ├── icons
│   ├── msg-f90a9a3d.js
│   ├── msg.js
│   ├── train-487d2c1f.css
│   ├── train-count-ad175de1.js
│   ├── train-count.js
│   ├── train.css
│   ├── train.scss
│   ├── utils-e3a5c9fc.js
│   ├── utils.js
│   └── vendors
	

after usage

├── _common
│   ├── bridge
│   ├── hybrid
│   ├── icons
│   ├── msg-f90a9a3d.js
│   ├── train-487d2c1f.css
│   ├── train-count-ad175de1.js
│   ├── utils-e3a5c9fc.js
│   └── vendors

Keywords

FAQs

Package last updated on 28 Sep 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc