{"_id":"gulp-drafts","_rev":"94611","name":"gulp-drafts","description":"Gulp plugin for removing files flagged as drafts. Can also be used as an assemble or verb plugin.","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:31:30.000Z","created":"2014-12-20T14:20:39.183Z","0.2.0":"2015-03-22T18:47:39.697Z","0.1.0":"2014-12-20T14:20:39.183Z"},"users":{"craigdmckenna":true},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/gulp-drafts.git"},"versions":{"0.2.0":{"name":"gulp-drafts","description":"Gulp plugin for removing files flagged as drafts. Can also be used as an assemble or verb plugin.","version":"0.2.0","homepage":"https://github.com/jonschlinkert/gulp-drafts","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/gulp-drafts.git"},"bugs":{"url":"https://github.com/jonschlinkert/gulp-drafts/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/gulp-drafts/blob/master/LICENSE"},"files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"get-first":"^0.1.1","kind-of":"^1.1.0","micromatch":"^2.1.0","through2":"^0.6.3"},"devDependencies":{"mocha":"*","vinyl":"^0.4.6"},"keywords":["assemble","assembleplugin","blog","draft","drafts","gulpplugin","post","template","verb","verbplugin"],"gitHead":"941b32777ca4344e34d58810aa5d7465713a82b7","_id":"gulp-drafts@0.2.0","_shasum":"861118b5a6eee812349516ee4e24a0f66867aa21","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"861118b5a6eee812349516ee4e24a0f66867aa21","size":2596,"noattachment":false,"key":"/gulp-drafts/-/gulp-drafts-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-drafts/download/gulp-drafts-0.2.0.tgz"},"directories":{},"publish_time":1427050059697,"_cnpm_publish_time":1427050059697,"_hasShrinkwrap":false},"0.1.0":{"name":"gulp-drafts","description":"Gulp plugin for skipping files marked as drafts.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/gulp-drafts","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git://github.com/jonschlinkert/gulp-drafts.git"},"bugs":{"url":"https://github.com/jonschlinkert/gulp-drafts/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/gulp-drafts/blob/master/LICENSE-MIT"},"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha -R spec"},"dependencies":{"get-first":"^0.1.1","kind-of":"^0.1.2","multimatch":"^1.0.1","through2":"^0.6.3"},"devDependencies":{"mocha":"*","should":"*","vinyl":"^0.4.6"},"keywords":["assemble","blog","draft","drafts","gulpplugin","post","template","verb"],"gitHead":"43f8b2d32ce4a760e0b54762bd228283aa80ef45","_id":"gulp-drafts@0.1.0","_shasum":"eddebce8b234a887293946fc75c322e8ca018b23","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"eddebce8b234a887293946fc75c322e8ca018b23","size":2433,"noattachment":false,"key":"/gulp-drafts/-/gulp-drafts-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-drafts/download/gulp-drafts-0.1.0.tgz"},"directories":{},"publish_time":1419085239183,"_cnpm_publish_time":1419085239183,"_hasShrinkwrap":false}},"readme":"# gulp-drafts [![NPM version](https://badge.fury.io/js/gulp-drafts.svg)](http://badge.fury.io/js/gulp-drafts)  [![Build Status](https://travis-ci.org/jonschlinkert/gulp-drafts.svg)](https://travis-ci.org/jonschlinkert/gulp-drafts) \n\n> Gulp plugin for removing files flagged as drafts. Can also be used as an assemble or verb plugin.\n\nThe filtering part of the plugin was inspired by [gulp-filter].\n\n## Install with [npm](npmjs.org)\n\n```bash\nnpm i gulp-drafts --save\n```\n\n## Usage\n\n_All of the following examples should work in any combination with one another._\n\n### Ignore files using glob patterns\n\n```js\nvar gulp = require('gulp');\nvar drafts = require('gulp-drafts');\n\ngulp.task('blog', function () {\n  gulp.src('posts/**/*.md')\n    // remove files from the pipeline if they match the given\n    // filepath or glob patterns:\n    .pipe(drafts('**/drafts/*.md'))\n    .pipe(gulp.dest('dist'));\n});\n```\n\n### Ignore files with the `draft` property\n\nThe plugin automatically filters out files with the `draft` or `data.draft` property set to `true`. Files won't have these properties unless you're setting them on the file object earlier in the pipeline. (_Or, if you're using this plugin with [assemble] or [verb] you can define the `draft` property in front-matter._)\n\n```js\nvar gulp = require('gulp');\nvar drafts = require('gulp-drafts');\n\ngulp.task('blog', function () {\n  gulp.src('posts/**/*.md')\n    // files with {draft: true} or {data: {draft: true}}\n    // will be removed\n    .pipe(drafts())\n    .pipe(gulp.dest('dist'));\n});\n```\n\n### Ignore files with custom properties\n\n```js\nvar gulp = require('gulp');\nvar drafts = require('gulp-drafts');\n\ngulp.task('blog', function () {\n  gulp.src('posts/**/*.md')\n    // ignore files with the `{foo: ...}` or `{bar: {baz: ...}}`\n    // properties\n    .pipe(drafts({props: ['foo', 'bar.baz']}))\n    .pipe(gulp.dest('dist'));\n});\n```\n\n### Verb example\n\nEverything works the same with [verb] and [assemble].\n\n```js\nvar verb = require('verb');\nvar drafts = require('verb-drafts');\n\nverb.task('blog', function () {\n  verb.src('posts/**/*.md')\n    // ignore files with the `{foo: ...}` or `{bar: {baz: ...}}`\n    // properties\n    .pipe(drafts({props: ['foo', 'bar.baz']}))\n    .pipe(verb.dest('dist'));\n});\n```\n\n\n## Run tests\n\nInstall dev dependencies:\n\n```bash\nnode i -d && mocha\n```\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/gulp-drafts/issues)\n\n## Author\n\n**Jon Schlinkert**\n \n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) \n\n## License\nCopyright (c) 2015 Jon Schlinkert  \nReleased under the MIT license\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 22, 2015._\n\n[gulp-filter]: https://github.com/sindresorhus/gulp-filter","_attachments":{},"homepage":"https://github.com/jonschlinkert/gulp-drafts","bugs":{"url":"https://github.com/jonschlinkert/gulp-drafts/issues"},"license":{"type":"MIT","url":"https://github.com/jonschlinkert/gulp-drafts/blob/master/LICENSE"}}