{"id":15732560,"url":"https://github.com/jonschlinkert/gulp-drafts","last_synced_at":"2025-03-13T04:31:17.088Z","repository":{"id":24853747,"uuid":"28268938","full_name":"jonschlinkert/gulp-drafts","owner":"jonschlinkert","description":"Gulp plugin for removing files flagged as drafts. Can also be used as an assemble or verb plugin.","archived":false,"fork":false,"pushed_at":"2020-04-01T00:04:31.000Z","size":8,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T18:52:25.238Z","etag":null,"topics":["blog","draft","gulp","ignore-files","plugin","post","published"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-20T14:19:56.000Z","updated_at":"2021-04-12T22:18:56.000Z","dependencies_parsed_at":"2022-07-24T02:46:18.821Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/gulp-drafts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgulp-drafts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgulp-drafts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgulp-drafts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Fgulp-drafts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/gulp-drafts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243341406,"owners_count":20275866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","draft","gulp","ignore-files","plugin","post","published"],"created_at":"2024-10-04T00:20:53.604Z","updated_at":"2025-03-13T04:31:16.632Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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\u003e 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 \u0026\u0026 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fgulp-drafts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Fgulp-drafts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Fgulp-drafts/lists"}