metalsmith
Advanced tools
Comparing version 0.0.4 to 0.1.0
0.1.0 - February 5, 2013 | ||
------------------------ | ||
* switch to `contents` always being a Buffer | ||
0.0.4 - February 5, 2013 | ||
@@ -3,0 +7,0 @@ ------------------------ |
@@ -140,9 +140,7 @@ | ||
if (err) return done(err); | ||
files[name] = { contents: buffer }; | ||
if (utf8(buffer)) { | ||
var parsed = front(buffer.toString()); | ||
files[name] = parsed.attributes; | ||
files[name].body = parsed.body.trim(); | ||
} else { | ||
files[name] = {}; | ||
files[name].body = buffer; | ||
files[name].contents = new Buffer(parsed.body.trim()); | ||
} | ||
@@ -170,4 +168,4 @@ done(); | ||
var out = path.join(dest, file); | ||
return fs.outputFile(out, data.body, done); | ||
return fs.outputFile(out, data.contents, done); | ||
} | ||
}; |
{ | ||
"name": "metalsmith", | ||
"repository": "git://github.com/segmentio/metalsmith.git", | ||
"version": "0.0.4", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
@@ -39,6 +39,6 @@ "description": "An extremely simple, pluggable static site generator.", | ||
"fs-readdir-recursive": "0.0.1", | ||
"metalsmith-templates": "0.0.2", | ||
"swig": "~1.3.2", | ||
"assert-dir-equal": "~0.1.0" | ||
"assert-dir-equal": "~0.1.0", | ||
"metalsmith-drafts": "0.0.1" | ||
} | ||
} |
@@ -120,3 +120,3 @@ | ||
var data = files[file]; | ||
data.body = data.title; | ||
data.contents = new Buffer(data.title); | ||
}); | ||
@@ -179,5 +179,5 @@ done(); | ||
it('should require a plugin', function(done){ | ||
exec('cd test/fixtures/cli-templates && ' + bin, function(err, stdout){ | ||
exec('cd test/fixtures/cli-drafts && ' + bin, function(err, stdout){ | ||
if (err) return done(err); | ||
equal('test/fixtures/cli-templates/build', 'test/fixtures/cli-templates/expected'); | ||
equal('test/fixtures/cli-drafts/build', 'test/fixtures/cli-drafts/expected'); | ||
done(); | ||
@@ -184,0 +184,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
4194951
366