{"name":"gulp-clone","description":"Clone files in memory in a gulp stream","version":"0.1.0","homepage":"https://github.com/mariocasciaro/gulp-clone","author":{"name":"Mario Casciaro"},"repository":{"type":"git","url":"git://github.com/mariocasciaro/gulp-clone"},"bugs":{"url":"https://github.com/mariocasciaro/gulp-clone/issues"},"licenses":[{"type":"MIT","url":"https://github.com/mariocasciaro/gulp-clone/blob/master/LICENSE"}],"dependencies":{"gulp-util":"~2.2.14","through2":"~0.4.1"},"devDependencies":{"chai":"~1.9.0","mocha":"~1.17.1"},"scripts":{"test":"node_modules/mocha/bin/_mocha test.js --reporter spec"},"keywords":["gulpplugin","clone"],"_id":"gulp-clone@0.1.0","dist":{"shasum":"bdeee535f9d6a0acfc449409c2ba8596978a75ce","tarball":"http://registry-npm.ywwl.com/gulp-clone/download/gulp-clone-0.1.0.tgz","integrity":"sha512-vbytKDL0wSqnCx3R54hmQEFizZ8NU0caaYkZsBO3x0QFRc8y3SXS59piKMhtQd95zUFkKXB5YpfhGYGxUggZMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDToLjRAS1BuMQ8elbbqcHVbonSxU0sgBRSaKt7+9Y4lwIhALvi4/eCuveXxTvIu6F31U6C6K7FzOQyNEC+rtB9JNNX"}],"size":2450,"noattachment":false,"key":"/gulp-clone/-/gulp-clone-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"mariocasciaro","email":"mariocasciaro@gmail.com"},"maintainers":[{"name":"mariocasciaro","email":"mariocasciaro@gmail.com"}],"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":1392325852792,"_cnpm_publish_time":1392325852792,"dist-tags":{"1.x":"1.1.4","latest":"2.0.1"}}