* add debug statements
This commit is contained in:
Ian Storm Taylor 2014-02-06 22:55:26 -08:00
parent d84cb86284
commit 149eb9177a
3 changed files with 10 additions and 2 deletions

View file

@ -1,4 +1,8 @@
0.0.3 - February 6, 2013
------------------------
* add debug statements
0.0.2 - February 6, 2013
------------------------
* swap to `merge` to not act on clones

View file

@ -1,4 +1,5 @@
var debug = require('debug')('metalsmith-collections');
var merge = require('merge');
/**
@ -23,6 +24,7 @@ function plugin(collections){
setImmediate(done);
Object.keys(files).forEach(function(file){
debug('checking file: %s', file);
var data = files[file];
var col = data.collection;
if (!cols[col]) return;
@ -31,6 +33,7 @@ function plugin(collections){
});
Object.keys(arrs).forEach(function(name){
debug('sorting collection: %s', name);
var arr = arrs[name];
var opts = cols[name];
var key = opts.sortBy || 'date';

View file

@ -2,11 +2,12 @@
"name": "metalsmith-collections",
"description": "A Metalsmith plugin that adds collections of files to the global metadata.",
"repository": "git://github.com/segmentio/metalsmith-collections.git",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"main": "lib/index.js",
"dependencies": {
"merge": "~1.1.2"
"merge": "~1.1.2",
"debug": "~0.7.4"
},
"devDependencies": {
"metalsmith": "0.x",