Gulp plugin for removing files flagged as drafts. Can also be used as an assemble or verb plugin.
The filtering part of the plugin was inspired by gulp-filter.
npm
Install withnpm i gulp-drafts --save
Usage
All of the following examples should work in any combination with one another.
Ignore files using glob patterns
var gulp = ;var drafts = ; gulp;
draft
property
Ignore files with the The 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.)
var gulp = ;var drafts = ; gulp;
Ignore files with custom properties
var gulp = ;var drafts = ; gulp;
Verb example
Everything works the same with [verb] and [assemble].
var verb = ;var drafts = ; verb;
Run tests
Install dev dependencies:
node i -d && mocha
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright (c) 2015 Jon Schlinkert
Released under the MIT license
This file was generated by verb-cli on March 22, 2015.