Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.08 KB

README.md

File metadata and controls

66 lines (45 loc) · 1.08 KB

metalsmith-debug

A Metalsmith plugin to debug Metalsmith and plugins.

Installation

$ npm install metalsmith-debug --save

CLI Usage

Install via npm and then add the metalsmith-debug key to your metalsmith.json:

{
  "plugins": {
    "metalsmith-debug": {}
  }
}

Then you can:

$ DEBUG=metalsmith:* metalsmith

To see all debug messages.

Or you can use namespaces to see only necessary messages:

$ DEBUG=metalsmith:files metalsmith

Available namespaces:

  • metalsmith:source
  • metalsmith:destination
  • metalsmith:metadata
  • metalsmith:files

If you want to debug a specific plugin you must name it:

$ DEBUG=metalsmith-collections metalsmith

You can specify multiple namespaces to debug by separating them with commas:

$ DEBUG=metalsmith:source,metalsmith-collections metalsmith

Javascript Usage

Pass metalsmith-debug plugin to Metalsmith with the use method:

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

metalsmith.use(debug());

License

MIT