Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cfware/gulp-skip-file
Gulp plugin to skip files.
https://github.com/cfware/gulp-skip-file
Last synced: about 2 months ago
JSON representation
Gulp plugin to skip files.
- Host: GitHub
- URL: https://github.com/cfware/gulp-skip-file
- Owner: cfware
- License: mit
- Created: 2018-05-23T16:36:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T09:18:16.000Z (over 4 years ago)
- Last Synced: 2024-04-29T17:23:12.698Z (9 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-skip-file
[![Travis CI][travis-image]][travis-url]
[![Greenkeeper badge][gk-image]](https://greenkeeper.io/)
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![MIT][license-image]](LICENSE)Gulp plugin to skip files.
### Install gulp-skip-file
This module requires node.js 6 or above.
```sh
npm i --save-dev gulp-skip-file
```## Usage
This is a pointless example as you can simply use `!` patterns on `gulp.src`.
The purpose of this module is to skip files added to a stream by an outside
module, where you do not control the call to `gulp.src`.```js
'use strict';const gulp = require('gulp');
const gulpIf = require('gulp-if');
const gulpSkipFile = require('gulp-skip-file');gulp.task('default', function() {
return gulp.src('src/**')
.pipe(gulpIf(/\.ts/, gulpSkipFile()))
.pipe(gulp.dest('build'));
});
```As shown gulpIf or another similar function should be used to restrict which
files are skipped.## Running tests
Tests are provided by xo and ava.
```sh
npm install
npm test
```[npm-image]: https://img.shields.io/npm/v/gulp-skip-file.svg
[npm-url]: https://npmjs.org/package/gulp-skip-file
[travis-image]: https://travis-ci.org/cfware/gulp-skip-file.svg?branch=master
[travis-url]: https://travis-ci.org/cfware/gulp-skip-file
[gk-image]: https://badges.greenkeeper.io/cfware/gulp-skip-file.svg
[downloads-image]: https://img.shields.io/npm/dm/gulp-skip-file.svg
[downloads-url]: https://npmjs.org/package/gulp-skip-file
[license-image]: https://img.shields.io/github/license/cfware/gulp-skip-file.svg