A Metalsmith plugin to debug Metalsmith and plugins.
$ npm install metalsmith-debug --save
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
Pass metalsmith-debug
plugin to Metalsmith with the use
method:
var debug = require('metalsmith-debug');
metalsmith.use(debug());