{"name":"gulp-clone","description":"Clone files in memory in a gulp stream","version":"2.0.0","homepage":"https://github.com/mariocasciaro/gulp-clone","author":{"name":"Mario Casciaro"},"repository":{"type":"git","url":"git://github.com/mariocasciaro/gulp-clone.git"},"bugs":{"url":"https://github.com/mariocasciaro/gulp-clone/issues"},"licenses":[{"type":"MIT","url":"https://github.com/mariocasciaro/gulp-clone/blob/master/LICENSE"}],"dependencies":{"plugin-error":"^0.1.2","through2":"^2.0.3"},"devDependencies":{"vinyl":"^2.1.0","chai":"^4.1.2","mocha":"^4.1.0"},"scripts":{"test":"node_modules/mocha/bin/_mocha test.js --reporter spec"},"keywords":["gulpplugin","clone"],"gitHead":"325278297f4cc67c07e3cc0b462528ef00adc9c0","_id":"gulp-clone@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"mariocasciaro","email":"contact@mariocasciaro.me"},"maintainers":[{"name":"mariocasciaro","email":"mariocasciaro@gmail.com"}],"dist":{"integrity":"sha512-LUiIuiJcwHXnpCCGlQWswF5c/tqNrhM9MS+Frl02XGT42IUAYUOd8wqqabI1uz9ZNxqIa+r3ZMHQRhULxpz7Jg==","shasum":"2b7d58049c3b598da24c1522f07c2efdb6e4ccbf","tarball":"http://registry-npm.ywwl.com/gulp-clone/download/gulp-clone-2.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXg0ruUE95egtC20poRR60D0qPheDbmHr8dvI3CjiKJQIhANFrT3F8CUJ1CTcGgVbCz/ZzrJTT31Ppvu490wcMPk7U"}],"size":2914,"noattachment":false,"key":"/gulp-clone/-/gulp-clone-2.0.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-clone-2.0.0.tgz_1516034300021_0.1468425360508263"},"directories":{},"readme":"# [gulp](https://github.com/wearefractal/gulp)-clone [![Build Status](https://secure.travis-ci.org/mariocasciaro/gulp-clone.png?branch=master)](https://travis-ci.org/mariocasciaro/gulp-clone) [![NPM version](https://badge.fury.io/js/gulp-clone.png)](http://badge.fury.io/js/gulp-clone) [![Dependency Status](https://gemnasium.com/mariocasciaro/gulp-clone.png)](https://gemnasium.com/mariocasciaro/gulp-clone)\n\n> Duplicate files in memory.\n\n## Install\n\nInstall with [npm](https://npmjs.org/package/gulp-clone).\n\n```\nnpm install --save-dev gulp-clone\n```\n\n## Changelog\n* 2.0.0: **Possible Breaking change** - The dependency from gutil has been dropped, this has been reported to cause a breaking change in some circumstances. Please continue to use the 1.0 branch if that would cause problems in your setup.\n* 1.0.0: **Breaking change** - There is a new operating mode, as explained in the 1st example. The old\n operating mode is still available under the `clone.sink()` property.\n\n## Example\n\ngulp-clone is useful in all those situations where you perform a destructive operation on your files (as for example concat) and you want to keep your original files for further processing or saving.\n\n```js\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar clone = require('gulp-clone');\nvar es = require('event-stream');\n\ngulp.task('default', function () {\n    var scripts = gulp.src('assets/**/*.js');\n\n    var bundle = scripts.pipe(clone())\n      .pipe(concat('bundle.js'));\n\n    // Merge the streams together, then write them to the out folder\n    return es.merge(scripts, bundle).pipe(gulp.dest('out'));\n});\n```\n\n##Example - Bypass mode\n\n```js\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar clone = require('gulp-clone');\n\nvar cloneSink = clone.sink();\n\ngulp.task('default', function () {\n  gulp.src('assets/**/*.js')\n    .pipe(cloneSink)                //<- clone objects streaming through this point\n    .pipe(concat(\"bundle.js\"))\n    .pipe(cloneSink.tap())          //<- output cloned objects + bundle.js\n    .pipe(gulp.dest('out/'));       //<- saves bundle.js + original files in one pass\n});\n```\n\n## License\n\n[MIT](http://en.wikipedia.org/wiki/MIT_License) @ Mario Casciaro\n","publish_time":1516034301067,"_cnpm_publish_time":1516034301067,"dist-tags":{"1.x":"1.1.4","latest":"2.0.1"}}