A Metalsmith plugin to ignore files that match a pattern.
JavaScript Makefile
Latest commit 62a7ae7 Nov 5, 2015 @lambtron lambtron Merge pull request #6 from arve0/patch-2
add link to multimatch in readme
Permalink
Failed to load latest commit information.
lib 0.1.2 Mar 11, 2014
test ocd Mar 11, 2014
.gitignore ocd Mar 11, 2014
History.md 0.1.2 Mar 11, 2014
Makefile first commit Mar 6, 2014
Readme.md add link to multimatch in readme Oct 21, 2015
package.json 0.1.2 Mar 11, 2014

Readme.md

metalsmith-ignore

A Metalsmith plugin to ignore files that match a pattern. Uses multimatch for matching.

Installation

$ npm install metalsmith-ignore

CLI Usage

Install via npm and then add the metalsmith-ignore key to your metalsmith.json plugins. The simplest case just ignores a single pattern:

{
  "plugins": {
    "metalsmith-ignore": "drafts/*"
  }
}

But you can also pass an array of patterns to ignore:

{
  "plugins": {
    "metalsmith-ignore": [
      "drafts/*",
      "unfinished/*"
    ]
  }
}

Javascript Usage

Pass the options to Metalsmith#use:

var ignore = require('metalsmith-ignore');

metalsmith.use(ignore('drafts/*'));

You can also pass an array of patterns to ignore:

var ignore = require('metalsmith-ignore');

metalsmith.use(ignore([
  'drafts/*',
  'unfinished/*'
]));

License

MIT