{"name":"fs-mkdirp-stream","version":"1.0.0","description":"Ensure directories exist before writing to them.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/fs-mkdirp-stream.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js","mkdirp.js"],"scripts":{"lint":"eslint index.js mkdirp.js test/ && jscs index.js mkdirp.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"graceful-fs":"^4.1.11","through2":"^2.0.3"},"devDependencies":{"eslint":"^1.10.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.4.0","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^3.2.0","rimraf":"^2.6.1"},"keywords":["fs","mkdirp","stream","mkdir","directory","directories","ensure"],"gitHead":"3a27851dc08f43dbe2d3fda2dddef34c67408715","bugs":{"url":"https://github.com/gulpjs/fs-mkdirp-stream/issues"},"homepage":"https://github.com/gulpjs/fs-mkdirp-stream#readme","_id":"fs-mkdirp-stream@1.0.0","_shasum":"0b7815fc3201c6a69e14db98ce098c16935259eb","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"}],"dist":{"shasum":"0b7815fc3201c6a69e14db98ce098c16935259eb","tarball":"http://registry-npm.ywwl.com/fs-mkdirp-stream/download/fs-mkdirp-stream-1.0.0.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2rlYCRA9TVsSAnZWagAAUpgQAIH74Pk+zSqBoauLV1Qj\nzP75fPlCNjuk15rz4M7CXxkFu/IwrphKAYBYSwCFIiYDYxWdy5TnmHA4hCm8\neCgpHA7HE4bKmNz96mTD5qfElxP685QI3Ac6B5C2WoiALK0RvKdsBy6ACdRy\nXJLhBhr9ZEUsV7jXLdqrmYErwj9vmXSNhS3s55VESg7pokbSeD/Eh7rzoPuE\nijfRpp3pnl64e3V4ZJHQNlJoDJ9k77x+MgnvBbD7sitBMEVisxFZQVQbeDB+\nuR1CrZnnDoyXb+MdpiCwHFuLe31t3cRmltIBpqBY9s4mhkvoIZGGQRBZJlEv\nRIEGd+A96TFk0Et4boQ4vI7FIDDgJIIylenjCl6yICvTbv/0D+YHvdD1DSqe\nAUJf9yXCQf6dyQVBPQDwKKJPTKZKKiABy3EVrCN//FHVTjETxF6vfPHvRkMp\n0nRZO5XVMYCTKh5UNk+WG8jmhVGF/UaGV+iDr81+NT68iNgMYjnlWG/zoLeG\nl4ejKumCGXwDpH1fZlTe8n3cGRVl5zXuIq6OxBpf/zVMDvfxn6uzPJF6vAPk\navWD6H+a/y9CKGtzKI7N0xem/r7sxaOqDMqOq+UVkJUb1IeZVc+h71pBV3uf\nnP331AAOh8Os90f0KYD75V4387tZmGsjS3JcyEOIMJOc27VYYhLCD5eHQhAN\nm+qW\r\n=aU+j\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgBDIreAImpPHeQqrsYIohV2UEwL1xf4ezyeGqLDKq1AIgKGv80p7O3XwsuxMNxhmymERKydCu3RAlbDRRIn4tAOA="}],"size":3241,"noattachment":false,"key":"/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fs-mkdirp-stream-1.0.0.tgz_1494720270021_0.31096577271819115"},"directories":{},"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# fs-mkdirp-stream\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nEnsure directories exist before writing to them.\n\n## Usage\n\n```js\nvar { Readable, Writable } = require('streamx');\nvar mkdirpStream = require('fs-mkdirp-stream');\n\nReadable.from([{ dirname: './path/to/my/', path: './path/to/my/file.js' }])\n  .pipe(\n    mkdirpStream(function (obj, callback) {\n      // callback can take 3 arguments (err, dirname, mode)\n      callback(null, obj.dirname);\n    })\n  )\n  .pipe(\n    new Writable({\n      write: function (obj, cb) {\n        // This will be called once the directory exists\n        // obj === { dirname: '/path/to/my/', path: '/path/to/my/file.js' }\n        cb();\n      },\n    })\n  );\n```\n\n## API\n\n### `mkdirpStream(resolver)`\n\nTakes a `resolver` function or string and returns a `streamx.Transform` stream.\n\nIf the `resolver` is a function, it will be called once per chunk with the signature `(chunk, callback)`. The `callback(error, dirpath, mode)` must be called with the `dirpath` to be created as the 2nd parameter or an `error` as the 1st parameter; optionally with a `mode` as the 3rd parameter.\n\nIf the `resolver` is a string, it will be created/ensured for each chunk (e.g. if it were deleted between chunks, it would be recreated). When using a string, a custom `mode` can't be used.\n\n## License\n\nMIT\n\nContains a custom implementation of `mkdirp` originally based on https://github.com/substack/node-mkdirp (Licensed MIT/X11 - Copyright 2010 James Halliday) with heavy modification to better support custom modes.\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/fs-mkdirp-stream.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/fs-mkdirp-stream\n[npm-image]: https://img.shields.io/npm/v/fs-mkdirp-stream.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/fs-mkdirp-stream/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/fs-mkdirp-stream/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/fs-mkdirp-stream\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/fs-mkdirp-stream/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n","publish_time":1494720271877,"_cnpm_publish_time":1494720271877,"dist-tags":{"latest":"2.0.1"}}