{"_id":"gulp-flatten","_rev":"83-0dc5b17f5ab167c6bc1ef4b54a175f72","name":"gulp-flatten","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.1":{"name":"gulp-flatten","version":"0.0.1","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.0.1","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"0bd0bf9121db07cb60d0ae3cfdca796197205452","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.0.1.tgz","integrity":"sha512-3NFD68n31qSbjagrb17IcBtp8KwIIyzshZ0Rlc5dNOtRJCY7EmENa6qKfchX7tk2NMkfI/aOofPvYjS41qN2rA==","signatures":[{"sig":"MEQCIDcVP/Vb/7vJPXJfbJ4JDAamGpQj+bbv2E1ZvG46PziQAiAGHR3cXJNJ+3DwXOlAD/8qdHM0WtEMDsijlXzQ1GIoww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","engines":{"node":">=0.10"},"scripts":{"test":"node_modules/.bin/mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"1.3.23","description":"remove or replace relative path for files","directories":{},"dependencies":{"through":"~2.3.4","gulp-util":"~2.2.9"},"devDependencies":{"mocha":"~1.17.0","should":"~2.1.1"}},"0.0.2":{"name":"gulp-flatten","version":"0.0.2","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.0.2","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"4221de44cf9842f79b62175e99a7273e50a57658","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.0.2.tgz","integrity":"sha512-fSNuWjawJTcypYtnDbrM6JAIbDjsT1/rmJWiQuFD3z+MbHUMzlpli4GbulqCv0ApyWx4BLZycwmTmtFKJ/t/fw==","signatures":[{"sig":"MEQCIAP+m4NWtFPGoFJagCL5FLp9gwO7mTo9NNNLlOoqTuywAiBgnl7/BThaIuiPT7IpWPUTZcZl7LkaWugjOtw9l7Zp0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","engines":{"node":">=0.10"},"scripts":{"test":"node_modules/.bin/mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"1.3.23","description":"remove or replace relative path for files","directories":{},"dependencies":{"through2":"~0.4.0","gulp-util":"~2.2.9"},"devDependencies":{"mocha":"~1.17.0","should":"~2.1.1"}},"0.0.3":{"name":"gulp-flatten","version":"0.0.3","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.0.3","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"12c5ea15ec9ca4d979a39373195f052faf1b5550","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.0.3.tgz","integrity":"sha512-IpEwkXFOhJl87SOIcTnnovhTcCpTaJe7d/ftQzqE57UCL8GhOkoap0uc4gfFMgzv9NyNQrPKz1IygfpWCLp18A==","signatures":[{"sig":"MEUCIQCDUOIORuJbwO8t8YiCgzejwYwSCVbYMUuahgEeQ+/+8QIgbK2eNjgMnXxOzC75EQ7ttDauTN968eoxluHPF1CTsBk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"12c5ea15ec9ca4d979a39373195f052faf1b5550","engines":{"node":">=0.10"},"gitHead":"9571fc47ef1b3e76612354f6b9a7145c3eb69602","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"1.4.14","description":"remove or replace relative path for files","directories":{},"dependencies":{"through2":"^0.6.1","gulp-util":"^3.0.1"},"devDependencies":{"mocha":"^1.21.4","should":"^4.0.4","pre-commit":"^0.0.9"}},"0.0.4":{"name":"gulp-flatten","version":"0.0.4","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.0.4","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"840c0f1740aea32676c1cffc82d38b3ec701fdf8","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.0.4.tgz","integrity":"sha512-8T73+mhBw7t5QmxaV8GcB0qLdXT8a5VFiEkFHB16/SQmoIn+RO2q5ZRx6PVcsa1GzgEqs8nDt+BWs4Rjq9W99A==","signatures":[{"sig":"MEUCIQDFxa3A8Livu6ZCQvR12XK+hugNu4ZsxhHr+9Eq3yEDpgIgdR86XRSsK6LrpnOvBNcWF3YDMaH5TXxRzACnpFJKQv0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"840c0f1740aea32676c1cffc82d38b3ec701fdf8","engines":{"node":">=0.10"},"gitHead":"cb71ae16fd43fc20042cfb8afad4e2738096efb3","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"1.4.14","description":"remove or replace relative path for files","directories":{},"dependencies":{"through2":"^0.6.1","gulp-util":"^3.0.1"},"devDependencies":{"gulp":"^3.8.8","mocha":"^1.21.4","should":"^4.0.4","pre-commit":"^0.0.9"}},"0.1.0":{"name":"gulp-flatten","version":"0.1.0","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.1.0","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"f9e3fa1c96b11d65fb0e290b5bacffa83b1e1780","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.1.0.tgz","integrity":"sha512-Fh8RuUgkEYqIuvcrJptj1fkWqNXqe2k4oCqtD98gmf/R0ypyjlsjDu4dC9GY+ZScxqZQ7i6P04uc3xqzmGfqaQ==","signatures":[{"sig":"MEUCIEKuEIQjM0I1qEAZ+eOWTP4018+/hG3sSwW1nrjIKhm8AiEAhAzwx0R1NcUblBVOK7tJsUzTdHAsSZXXs8znbF6l9WQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"f9e3fa1c96b11d65fb0e290b5bacffa83b1e1780","engines":{"node":">=0.10"},"gitHead":"359887e73bee877e7933c49a3cdd4b678473fa6c","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"2.11.2","description":"remove or replace relative path for files","directories":{},"_nodeVersion":"2.2.1","dependencies":{"through2":"^0.6.1","gulp-util":"^3.0.1"},"devDependencies":{"gulp":"^3.8.8","mocha":"^1.21.4","should":"^4.0.4","pre-commit":"^0.0.9"}},"0.1.1":{"name":"gulp-flatten","version":"0.1.1","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.1.1","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"b7f00a6503771128ca138d77bad36949bcb85c15","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.1.1.tgz","integrity":"sha512-3lZ8nGVA6CNDiCRZ+gAE/Z/Xtw0LcqrVfXJY37G4hwGIehCdXD5wNrOgsnqyimL4I1CaWTHQFSBtlkIGu7bdfQ==","signatures":[{"sig":"MEYCIQDqT/vXAlMwzC9IeAbfcaEehFvQ/AnkxRdlhgisGOlqxAIhALqakLwlPd/903LnvInoptxC7Wki5MOcg1MjvTuWNQQi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"b7f00a6503771128ca138d77bad36949bcb85c15","engines":{"node":">=0.10"},"gitHead":"9e375c9492db2279bc19b2cb54bac1db95694be5","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"2.13.0","description":"remove or replace relative path for files","directories":{},"_nodeVersion":"2.4.0","dependencies":{"through2":"^2.0.0","gulp-util":"^3.0.1"},"devDependencies":{"gulp":"^3.8.8","mocha":"^2.2.5","should":"^7.0.2","pre-commit":"^1.0.10"}},"0.2.0":{"name":"gulp-flatten","version":"0.2.0","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.2.0","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"892d517e38d7900fd454cf9a1e0210300e92eb06","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.2.0.tgz","integrity":"sha512-8kKeBDfHGx0CEWoB6BPh5bsynUG2VGmSz6hUlX531cfDz/+PRYZa9i3e3+KYuaV0GuCsRZNThSRjBfHOyypy8Q==","signatures":[{"sig":"MEYCIQC8dVQP7ibZqWKRbTfemvi7pmkD7RQK8m2x5WVTtPknagIhANi5qp/MYmHe2GAPJA2+qTkN76qfRI9wDQMajb9XGNbj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"892d517e38d7900fd454cf9a1e0210300e92eb06","engines":{"node":">=0.10"},"gitHead":"2bf02a4a7a6dd4e1e5a6807b9061d4341298ccbd","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"2.13.4","description":"remove or replace relative path for files","directories":{},"_nodeVersion":"2.5.0","dependencies":{"through2":"^2.0.0","gulp-util":"^3.0.1"},"devDependencies":{"gulp":"^3.8.8","mocha":"^2.2.5","should":"^7.0.2","pre-commit":"^1.0.10"}},"0.3.0":{"name":"gulp-flatten","version":"0.3.0","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.3.0","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"83b92b967bb433f4018565768385ee9ae71a38e4","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.3.0.tgz","integrity":"sha512-kM4xGqz+j4WuNVOAM6RH22QPM08aTAAENbL7nW5vHzQFqRfgQpnOaDe6zYE2Y5mvFOxF3EJHZ+ZXJPV+/q5wbg==","signatures":[{"sig":"MEUCIHkNo6E+qLmMHKiY9MFupCrLkYc3x1gcRTWIf4u4m0n0AiEA4W/LKo3vEampsDzOIRrjz9bZT3qTTmK/5+/hEOMwTNQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"83b92b967bb433f4018565768385ee9ae71a38e4","engines":{"node":">=0.10"},"gitHead":"2229a21ac9e683c4b3f6c90bf60b4869d52dbf16","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"3.8.3","description":"remove or replace relative path for files","directories":{},"_nodeVersion":"5.10.1","dependencies":{"through2":"^2.0.0","gulp-util":"^3.0.7"},"devDependencies":{"gulp":"^3.9.0","mocha":"^2.3.4","should":"^7.1.1","pre-commit":"^1.1.2","eslint-config-airbnb":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/gulp-flatten-0.3.0.tgz_1466128841590_0.5387645068112761","host":"packages-16-east.internal.npmjs.com"}},"0.3.1":{"name":"gulp-flatten","version":"0.3.1","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.3.1","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"51e7fec13a33c404578d18c1589d1b5bc45fe1d6","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.3.1.tgz","integrity":"sha512-x+DCTZQ4Crh5mgKeaccsXFLaIOZmG2MYj9pp7jAZRIBAx3Ov010NxyDFAt0J5rru24xBIfi34CyldUHjvBhAKQ==","signatures":[{"sig":"MEQCICgHM5VbvCa8jm//sXYYwkh6GxHcX3zSxoRXYctg83h+AiA7Ae1v9/eI9F/JtrExWPI30fHTrLQ58EPM/FxLBVckZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"51e7fec13a33c404578d18c1589d1b5bc45fe1d6","engines":{"node":">=0.10"},"gitHead":"04c2b4625b947cd07acf6a924065eb13fe92f2ea","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"3.10.6","description":"remove or replace relative path for files","directories":{},"_nodeVersion":"6.2.2","dependencies":{"through2":"^2.0.0","gulp-util":"^3.0.7"},"devDependencies":{"gulp":"^3.9.0","mocha":"^2.3.4","should":"^7.1.1","pre-commit":"^1.1.2","eslint-config-airbnb":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/gulp-flatten-0.3.1.tgz_1471072226352_0.27203780342824757","host":"packages-16-east.internal.npmjs.com"}},"0.4.0":{"name":"gulp-flatten","version":"0.4.0","keywords":["gulpplugin","gulp","flatten","relative","path"],"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","_id":"gulp-flatten@0.4.0","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"homepage":"https://github.com/armed/gulp-flatten","bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"dist":{"shasum":"d9ac819416c30fd5dfb3dea9da79c83a1bcd61d1","tarball":"https://registry.npmjs.org/gulp-flatten/-/gulp-flatten-0.4.0.tgz","integrity":"sha512-eg4spVTAiv1xXmugyaCxWne1oPtNG0UHEtABx5W8ScLiqAYceyYm6GYA36x0Qh8KOIXmAZV97L2aYGnKREG3Sg==","signatures":[{"sig":"MEQCIDa+30hRGc1onw/RjSsstaq6rU1GE8YimBVgQAXOnsnGAiB3bkmK88hD8NiXW29ui2u+Dh7G3Iw6NMT26IUIPvAAIw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","engines":{"node":">=0.10"},"gitHead":"0119b8c6a151c43c5de00f3f168a97fed700c6ed","scripts":{"test":"mocha -R spec"},"_npmUser":{"name":"armed","email":"artem.medeusheyev@gmail.com"},"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"_npmVersion":"5.5.1","description":"remove or replace relative path for files","directories":{},"_nodeVersion":"9.3.0","dependencies":{"through2":"^2.0.0","plugin-error":"^0.1.2"},"devDependencies":{"gulp":"^3.9.0","mocha":"^2.3.4","vinyl":"^2.1.0","should":"^7.1.1","pre-commit":"^1.1.2","eslint-config-airbnb":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/gulp-flatten-0.4.0.tgz_1514700084356_0.10074078803882003","host":"s3://npm-registry-packages"}}},"time":{"created":"2014-01-11T15:38:32.133Z","modified":"2024-10-25T14:48:23.909Z","0.0.1":"2014-01-11T15:38:32.134Z","0.0.2":"2014-01-13T13:18:58.246Z","0.0.3":"2014-09-10T08:05:19.557Z","0.0.4":"2014-10-11T13:00:38.340Z","0.1.0":"2015-06-30T18:18:16.053Z","0.1.1":"2015-07-27T06:15:54.183Z","0.2.0":"2015-08-26T12:29:32.870Z","0.3.0":"2016-06-17T02:00:42.597Z","0.3.1":"2016-08-13T07:10:27.957Z","0.4.0":"2017-12-31T06:01:24.527Z"},"bugs":{"url":"https://github.com/armed/gulp-flatten/issues"},"author":{"name":"Artem Medeusheyev","email":"artem.medeusheyev@gmail.com"},"license":"MIT","homepage":"https://github.com/armed/gulp-flatten","keywords":["gulpplugin","gulp","flatten","relative","path"],"repository":{"url":"git://github.com/armed/gulp-flatten.git","type":"git"},"description":"remove or replace relative path for files","maintainers":[{"name":"armed","email":"artem.medeusheyev@gmail.com"}],"readme":"# [gulp](http://gulpjs.com)-flatten [![NPM version](https://img.shields.io/npm/v/gulp-flatten.svg)](http://badge.fury.io/js/gulp-flatten) [![Build Status](https://api.travis-ci.org/armed/gulp-flatten.svg?branch=master)](https://travis-ci.org/armed/gulp-flatten)\n\n>Remove or replace relative path for files (gulp v3).\n\n## Install\n\n```\nnpm install gulp-flatten\n```\n\n## Usage\n\nExample source directory with bower compoments:\n```\n├── angular\n│   ├── README.md\n│   ├── angular-csp.css\n│   ├── angular.js\n│   ├── angular.min.js\n│   └── bower.json\n├── angular-route\n│   ├── README.md\n│   ├── angular-route.js\n│   ├── angular-route.min.js\n│   ├── angular-route.min.js.map\n│   └── bower.json\n├── angular-sanitize\n│   ├── README.md\n│   ├── angular-sanitize.js\n│   ├── angular-sanitize.min.js\n│   ├── angular-sanitize.min.js.map\n│   └── bower.json\n└── bootstrap\n    ├── DOCS-LICENSE\n    ├── LICENSE\n    ├── LICENSE-MIT\n    ├── README.md\n    ├── bower.json\n    └── dist\n        ├── css\n        │   ├── bootstrap-theme.css\n        │   ├── bootstrap-theme.min.css\n        │   ├── bootstrap.css\n        │   └── bootstrap.min.css\n        ├── fonts\n        │   ├── glyphicons-halflings-regular.eot\n        │   ├── glyphicons-halflings-regular.svg\n        │   ├── glyphicons-halflings-regular.ttf\n        │   └── glyphicons-halflings-regular.woff\n        └── js\n            ├── bootstrap.js\n            └── bootstrap.min.js\n```\n\nBy default `gulp` stores files with it's relative paths. To copy all minified javascript files from `bower_components` to `build` folder without relative paths:\n```js\nvar flatten = require('gulp-flatten');\n\ngulp.src('bower_components/**/*.min.js')\n  .pipe(flatten())\n  .pipe(gulp.dest('build/js'));\n```\n\nResult will be list of all `.min.js` files inside `build/js` dir:\n```\nbuild\n└── js\n    ├── angular-route.min.js\n    ├── angular-sanitize.min.js\n    ├── angular.min.js\n    └── bootstrap.min.js\n```\n\n## Options\n\n### flatten(options)\n\n#### options.newPath\n\nType: `String`  \nDefault: `''`\n\nRelative path for file.\n\n#### options.includeParents\n\nType: `Number` or `Array` of two numbers\n\nIf passed in as positive number, it will include the number of top-level parents in the output. Using this code:\n\n```js\ngulp.src(['bower_components/**/*.css'])\n  .pipe(flatten({ includeParents: 1} ))\n  .pipe(gulp.dest('build/'));\n```\n\nwill create this structure (from sample directory tree above):\n\n```\n└── bootstrap\n    ├── bootstrap-theme.css\n    ├── bootstrap-theme.min.css\n    ├── bootstrap.css\n    └── bootstrap.min.css\n```\n\nIf passed in as negative number, it will include the number of bottom-level parents in the output. Using this code:\n\n```js\ngulp.src(['bower_components/**/*.css'])\n  .pipe(flatten({ includeParents: -1} )) //or indludeParents: [0, 1]\n  .pipe(gulp.dest('build/'));\n```\n\nwill create this structure:\n\n```\n└── css\n    ├── bootstrap-theme.css\n    ├── bootstrap-theme.min.css\n    ├── bootstrap.css\n    └── bootstrap.min.css\n```\n\nIf passes as array of two numbers, both parents from top and bottom will be kept in resulting path of a file.\n\n```js\ngulp.src(['bower_components/**/*.css'])\n  .pipe(flatten({ includeParents: [1, 1]} ))\n  .pipe(gulp.dest('build/'));\n```\n\nwill create this structure:\n\n```\n└── bootstrap\n    └── css\n        ├── bootstrap-theme.css\n        ├── bootstrap-theme.min.css\n        ├── bootstrap.css\n        └── bootstrap.min.css\n```\n\n#### options.subPath\n\nType: Number or Array of two Numbers [begin, end]\n\nThis options applies `Array.slice` to the array of path elements and allows you\nto receive a subsequences of the path.\n\n```js\ngulp.src(['bower_components/**/*.css'])\n  .pipe(flatten({ subPath: [1, 1]} ))\n  .pipe(gulp.dest('build/'));\n```\nThis as an example would flatten `top1/top2/bottom2/bottom1/file.txt` to `top2/file.txt`.\n\n`[1, -1]` would flatten `top1/top2/bottom2/bottom1/file.txt` to `top2/bottom2/file.txt`.\n\nPlease refer to the [Array.slice documentation](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) for a detailed description.\n\n**!** If you're using both `options.includeParents` combined with `options.subPath`\nplease note that `options.includeParents` is applied first.\n\n## License\n\nMIT\n","readmeFilename":"README.md","users":{"z1c0":true,"armed":true,"ccd3v":true,"ginof":true,"h4des":true,"jruif":true,"kwesi":true,"lpent":true,"yikuo":true,"zoxon":true,"-jason":true,"fotooo":true,"kingyo":true,"lowoee":true,"yoking":true,"acoyang":true,"beholdr":true,"itonyyo":true,"keberox":true,"maxwang":true,"andamira":true,"arahnoid":true,"dennykuo":true,"ifeature":true,"markmiro":true,"otravers":true,"robermac":true,"rplittle":true,"tmurngon":true,"wuwenbin":true,"xgheaven":true,"hongz1125":true,"joaocunha":true,"rosterloh":true,"sapronlee":true,"adammacias":true,"cognivator":true,"louiskenzo":true,"owanturist":true,"shawnsandy":true,"brainmurder":true,"giovannipds":true,"wangnan0610":true,"zhangchiqing":true,"chinawolf_wyp":true,"edwin_estrada":true}}