{"_id":"vinyl-transform","_rev":"20-26e53124fab5504fa910993fe08bbebd","name":"vinyl-transform","description":"Use standard text transform streams to write fewer gulp plugins","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"vinyl-transform","description":"Use standard text transform streams to write fewer gulp plugins","version":"0.0.0","main":"index.js","browser":"index.js","dependencies":{"duplexer2":"0.0.1","through2":"~0.4.1","new-from":"0.0.3","stream-browserify":"~0.1.3","bl":"~0.7.0"},"devDependencies":{"tape":"~2.3.2","gulp":"~3.5.0","vinyl":"~0.2.3","map-stream":"~0.1.0"},"scripts":{"test":"node test"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"license":"MIT","repository":{"type":"git","url":"git://github.com/hughsk/vinyl-transform"},"bugs":{"url":"https://github.com/hughsk/vinyl-transform/issues"},"homepage":"https://github.com/hughsk/vinyl-transform","keywords":["vinyl","gulp","gulpfriendly","text","transform","streaming","through"],"_id":"vinyl-transform@0.0.0","dist":{"shasum":"737981a8eaf2e91ebb81b1186e26dca03bbf8679","tarball":"https://registry.npmjs.org/vinyl-transform/-/vinyl-transform-0.0.0.tgz","integrity":"sha512-+htQoLlA3Igq8pulbscL2EXKA4++T+YYchyHFFIzKyuy0JRs8lkwcPdMpWMG2KpZBsFuoGYp8YTsHD7/L2FBHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUL2peKlkcva+1mProjwPczuXar7GiNaa9+TmpoWjdWAIhAIoN0K25U8P5VlDJk6Li8tI+tUB64LaOPNCJll+VNMb8"}]},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"directories":{}},"0.0.1":{"name":"vinyl-transform","description":"Use standard text transform streams to write fewer gulp plugins","version":"0.0.1","main":"index.js","browser":"index.js","dependencies":{"duplexer2":"0.0.1","through2":"~0.4.1","new-from":"0.0.3","bl":"~0.7.0"},"devDependencies":{"tape":"~2.3.2","gulp":"~3.5.0","vinyl":"~0.2.3","map-stream":"~0.1.0"},"scripts":{"test":"node test"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"license":"MIT","repository":{"type":"git","url":"git://github.com/hughsk/vinyl-transform"},"bugs":{"url":"https://github.com/hughsk/vinyl-transform/issues"},"homepage":"https://github.com/hughsk/vinyl-transform","keywords":["vinyl","gulp","gulpfriendly","text","transform","streaming","through"],"_id":"vinyl-transform@0.0.1","dist":{"shasum":"3ff6d502eb24d09922889a08e45e9811e50b5291","tarball":"https://registry.npmjs.org/vinyl-transform/-/vinyl-transform-0.0.1.tgz","integrity":"sha512-0/Mc+f6i6SGnAOy/noL18Rha+msj1dM0j0YNOAaO/ZqdOaL8ib5eNWoVxSd+P3veNnxsugL7HUit+4zSAu+QnQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlRLrhUNcADatSWJAqHxs85elohlhrLyONCRO/bOo6OwIhAPalQVFp946CUnN6mS/c7WePrCdf6dyxY0Ov4iwdXwjK"}]},"_from":".","_npmVersion":"1.3.25","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"directories":{}},"1.0.0":{"name":"vinyl-transform","description":"Use standard text transform streams to write fewer gulp plugins","version":"1.0.0","main":"index.js","browser":"index.js","dependencies":{"through2":"~0.4.1","new-from":"0.0.3","bl":"~0.7.0"},"devDependencies":{"tape":"~2.3.2","gulp":"~3.5.0","vinyl":"~0.2.3","map-stream":"~0.1.0"},"scripts":{"test":"node test"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"license":"MIT","repository":{"type":"git","url":"git://github.com/hughsk/vinyl-transform"},"bugs":{"url":"https://github.com/hughsk/vinyl-transform/issues"},"homepage":"https://github.com/hughsk/vinyl-transform","keywords":["vinyl","gulp","gulpfriendly","text","transform","streaming","through"],"gitHead":"d0f8c35fa02e41608660a91342d8f68b11dcab28","_id":"vinyl-transform@1.0.0","_shasum":"050e4e515a20773cf4baf8dcd21efde178a83af6","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.28","_npmUser":{"name":"hughsk","email":"hughskennedy@gmail.com"},"maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"dist":{"shasum":"050e4e515a20773cf4baf8dcd21efde178a83af6","tarball":"https://registry.npmjs.org/vinyl-transform/-/vinyl-transform-1.0.0.tgz","integrity":"sha512-fVITjBTLBei8lFD3bCzcqg+y+4zstN8lW69d9nPsyAY6bflhJkIsI+Dx88Z3hHtCSxs5Qp1DAWr3WJDpSuzmiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAn/DU1mnmXo51RcT4Ne9bWMnmB60FAnCLkbfWxm5fgeAiBJQ12EHW83z50SkjLIGFlYayxIxhBSQ6lTQLZ332+XyA=="}]},"directories":{}}},"readme":"# vinyl-transform [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/vinyl-transform&title=vinyl-transform&description=hughsk/vinyl-transform%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) #\n\n**vinyl-transform** wraps standard text transform streams so you can\n[write fewer gulp plugins](http://blog.overzealous.com/post/74121048393/why-you-shouldnt-create-a-gulp-plugin-or-how-to-stop).\nFulfills a similar use case to [vinyl-map](http://github.com/hughsk/vinyl-map)\nand [vinyl-source-stream](http://github.com/hughsk/vinyl-source-stream).\n\nThis module lets you take your standard text transform streams from npm,\n(e.g. [envify](http://github.com/hughsk/envify)), and use them in a\n[vinyl](http://github.com/gulpjs) pipeline. It'll transparently take care of\nhandling both buffered and streaming vinyl instances for you too.\n\n## Usage ##\n\n[![vinyl-transform](https://nodei.co/npm/vinyl-transform.png?mini=true)](https://nodei.co/npm/vinyl-transform)\n\n### `createStream(transformFn)` ###\n\nCreates a vinyl transform stream. `transformFn(filename)` is a function which\ntakes the file's path and returns a text transform stream. If you've used\n[browserify](http://github.com/substack/node-browserify)'s\n[transform API](https://github.com/substack/node-browserify#btransformopts-tr)\nyou'll recognise this pattern: it's effectively the same API used here.\n\nHere's an example of using this to... uppercase a bunch of files:\n\n``` javascript\nvar transform = require('vinyl-tranform')\nvar map = require('map-stream')\nvar gulp = require('gulp')\n\ngulp.task('uppercase', function() {\n  var uppercaser = transform(function(filename) {\n    return map(function(chunk, next) {\n      return next(null, chunk.toString().toUpperCase())\n    })\n  })\n\n  gulp.src('*.txt')\n    .pipe(uppercaser)\n    .pipe(gulp.dest('dist/'))\n})\n```\n\nAnd convert `.gif` images into `.webm` videos:\n\n``` javascript\nvar createGIFStream = require('gif-video')\nvar transform = require('vinyl-transform')\nvar gulp = require('gulp')\n\ngulp.task('gif-to-webm', function() {\n  gulp.src('images/*.gif')\n    .pipe(transform(createGIFStream))\n    .pipe(gulp.dest('dist/videos/'))\n})\n```\n\nOr inject scripts into your HTML:\n\n``` javascript\nvar transform = require('vinyl-transform')\nvar inject = require('script-injector')\nvar gulp = require('gulp')\n\ngulp.task('pages', function() {\n  var injector = transform(function() {\n    return inject(function() {\n      console.log('this script wasn\\'t here before')\n    })\n  })\n\n  gulp.src('*.html')\n    .pipe(injector)\n    .pipe(gulp.dest('dist/'))\n})\n```\n\n## License ##\n\nMIT. See [LICENSE.md](http://github.com/hughsk/vinyl-transform/blob/master/LICENSE.md) for details.\n","maintainers":[{"name":"hughsk","email":"hughskennedy@gmail.com"}],"time":{"modified":"2022-06-28T17:32:36.947Z","created":"2014-01-26T08:28:09.608Z","0.0.0":"2014-01-26T08:28:09.608Z","0.0.1":"2014-01-27T11:31:25.171Z","1.0.0":"2014-11-26T21:03:00.941Z"},"readmeFilename":"README.md","users":{"romelyus":true,"minimit":true,"johnsonj":true,"alexkval":true,"tobiasalthoff":true,"mohankethees":true,"jrod0x0309":true,"fmoliveira":true,"gonprazeres":true,"antixrist":true,"igorpupkinable":true,"tin-lek":true,"iori20091101":true,"morewry":true},"homepage":"https://github.com/hughsk/vinyl-transform","keywords":["vinyl","gulp","gulpfriendly","text","transform","streaming","through"],"repository":{"type":"git","url":"git://github.com/hughsk/vinyl-transform"},"author":{"name":"Hugh Kennedy","email":"hughskennedy@gmail.com","url":"http://hughsk.io/"},"bugs":{"url":"https://github.com/hughsk/vinyl-transform/issues"},"license":"MIT"}