metalsmith
Advanced tools
Comparing version 0.4.0 to 0.5.0
0.5.0 - March 21, 2013 | ||
---------------------- | ||
* remove destination directory when writing | ||
* expose `#run` to run middleware stack | ||
* fix jade examples | ||
0.4.0 - March 14, 2013 | ||
@@ -3,0 +9,0 @@ ---------------------- |
@@ -10,2 +10,3 @@ | ||
var readdir = require('recursive-readdir'); | ||
var rm = require('rimraf'); | ||
var utf8 = require('is-utf8'); | ||
@@ -107,3 +108,2 @@ var Ware = require('ware'); | ||
fn = fn || noop; | ||
var ware = this.ware; | ||
var self = this; | ||
@@ -113,3 +113,3 @@ | ||
if (err) return fn(err); | ||
ware.run(files, self, function(err){ | ||
self.run(files, function(err, files){ | ||
if (err) return fn(err); | ||
@@ -124,2 +124,13 @@ self.write(files, function(err){ | ||
/** | ||
* Run a set of `files` through the middleware stack. | ||
* | ||
* @param {Object} files | ||
* @param {Function} fn | ||
*/ | ||
Metalsmith.prototype.run = function(files, fn){ | ||
this.ware.run(files, this, fn); | ||
}; | ||
/** | ||
* Read the source directory, parsing front matter and call `fn(files)`. | ||
@@ -168,3 +179,6 @@ * | ||
each(Object.keys(files), write, fn); | ||
rm(dest, function(err){ | ||
if (err) return fn(err); | ||
each(Object.keys(files), write, fn); | ||
}); | ||
@@ -171,0 +185,0 @@ function write(file, done){ |
{ | ||
"name": "metalsmith", | ||
"repository": "git://github.com/segmentio/metalsmith.git", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"license": "MIT", | ||
@@ -35,7 +35,7 @@ "description": "An extremely simple, pluggable static site generator.", | ||
"chalk": "^0.4.0", | ||
"clone": "^0.1.11" | ||
"clone": "^0.1.11", | ||
"rimraf": "^2.2.6" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.x", | ||
"rimraf": "~2.2.6", | ||
"fs-readdir-recursive": "0.0.1", | ||
@@ -42,0 +42,0 @@ "assert-dir-equal": "~0.1.0", |
@@ -129,2 +129,6 @@ # Metalsmith | ||
#### #run(fn) | ||
Build with the given settings without writing the files to disk and call `fn(err, files)`. | ||
#### #source(path) | ||
@@ -131,0 +135,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13231
4
157
160
10
+ Addedrimraf@^2.2.6
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedwrappy@1.0.2(transitive)