├── LICENSE ├── README.md ├── index.js └── package.json /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Daniel 'Eisbehr' Kern 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gulp-noop 2 | 3 | [![GitHub version](https://badge.fury.io/gh/dkern%2Fgulp-noop.svg)](http://github.com/dkern/gulp-noop) 4 | [![NPM version](https://badge.fury.io/js/gulp-noop.svg)](http://www.npmjs.org/package/gulp-noop) 5 | [![Dependencies Status](https://david-dm.org/dkern/gulp-noop/status.svg)](https://david-dm.org/dkern/gulp-noop) 6 | 7 | simple no-operation plugin for [gulp](http://gulpjs.com/) 8 | 9 | ----- 10 | 11 | ## About 12 | This plugin is just the same as `noop` in [`gulp-util`](https://www.npmjs.com/package/gulp-util). 13 | If you already use `gulp-util` in your project, you should pick this instead of `gulp-noop`. 14 | If not, this plugin is a smaller and lighter alternative. :) 15 | 16 | 17 | ## Install 18 | ```SH 19 | $ npm install --save-dev gulp-noop 20 | ``` 21 | [![NPM](https://nodei.co/npm/gulp-noop.png?compact=true)](https://nodei.co/npm/gulp-noop/) 22 | 23 | 24 | ## Example 25 | Use it for inline decisions: 26 | 27 | ```JS 28 | var noop = require("gulp-noop"); 29 | var obfuscate = true; 30 | 31 | gulp.task("my-task", function() { 32 | return gulp.src("*.js") 33 | .pipe(jshint()) 34 | .pipe(obfuscate ? uglify() : noop()) 35 | .pipe(gulp.dest("./dist")); 36 | }); 37 | ``` 38 | 39 | Or just replace other actions with `noop()`, like for debugging purpose: 40 | ```JS 41 | var noop = require("gulp-noop"); 42 | 43 | gulp.task("my-task", function() { 44 | return gulp.src("*.js") 45 | .pipe(noop()) 46 | .pipe(noop()) 47 | .pipe(gulp.dest("./dist")); 48 | }); 49 | ``` -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * gulp-noop 3 | * simple no-operation plugin for gulp 4 | */ 5 | 6 | "use strict"; 7 | 8 | var through = require("through2"); 9 | 10 | module.exports = function() { 11 | // just pass-through anything 12 | return through.obj(); 13 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gulp-noop", 3 | "description": "simple no-operation plugin for gulp", 4 | "version": "1.0.1", 5 | "homepage": "https://github.com/dkern/gulp-noop", 6 | "bugs": "http://github.com/dkern/gulp-noop/issues", 7 | "repository": { 8 | "type": "git", 9 | "url": "git@github.com:dkern/gulp-noop.git" 10 | }, 11 | "author": { 12 | "name": "Daniel 'Eisbehr' Kern", 13 | "email": "jquery@eisbehr.de", 14 | "url": "http://eisbehr.de/" 15 | }, 16 | "license": "MIT", 17 | "main": "index.js", 18 | "keywords": [ 19 | "gulp", 20 | "noop" 21 | ], 22 | "dependencies": { 23 | "through2": "^2.0.0" 24 | }, 25 | "engines": { 26 | "node": ">=0.10" 27 | } 28 | } --------------------------------------------------------------------------------