Comparing version 0.6.5 to 0.7.0
@@ -11,5 +11,5 @@ #!/usr/bin/env node | ||
var arg = process.argv.splice(2) | ||
, isValid = !(arg && arg.length >= 2) | ||
, isValid = arg && arg.length >= 2 | ||
if (isValid) { | ||
if (!isValid) { | ||
return console.error('Usage: blake source_directory target_directory [source_file ...]'); | ||
@@ -16,0 +16,0 @@ } |
@@ -24,4 +24,4 @@ | ||
, views = props.views | ||
if (!header) { | ||
if (!header) { | ||
throw(new Error('Header required in ' + filename)) | ||
@@ -43,5 +43,5 @@ } | ||
header.date = header.date ? new Date(header.date) : new Date() | ||
header.path = header.path | ||
header.path = header.path | ||
|| path.dirname(filename).split(paths.posts)[1] | ||
|| null | ||
|| '' | ||
@@ -51,3 +51,3 @@ item.header = header | ||
item.paths = paths | ||
item.title = header.title | ||
@@ -63,4 +63,4 @@ item.name = header.name | ||
item.template = templates[header.template] | ||
return item | ||
} |
{ | ||
"name": "blake", | ||
"description": "Simple, blog aware infrastructure to generate static sites", | ||
"version": "0.6.5", | ||
"version": "0.7.0", | ||
"homepage": "http://michaelnisi.github.com/blake/", | ||
@@ -45,3 +45,3 @@ "repository": { | ||
"engines": { | ||
"node": ">=0.6.0" | ||
"node": "0.10.x" | ||
}, | ||
@@ -48,0 +48,0 @@ "license": "MIT", |
@@ -7,5 +7,5 @@ var test = require('tap').test | ||
, config = require('./config.js') | ||
, target = config.target | ||
, target = config.target | ||
, props = config.props | ||
, paths = props.paths | ||
, paths = props.paths | ||
@@ -22,5 +22,5 @@ test('read', function (t) { | ||
t.ok(header.date instanceof Date, 'should be instance of Date') | ||
t.equal(header.path, null) | ||
t.ok(item.body.length, 'should have body') | ||
t.equal(header.path, '') | ||
t.ok(item.body.length, 'should have body') | ||
t.equal(item.title, null) | ||
@@ -27,0 +27,0 @@ t.equal(item.name, 'index.html') |
Sorry, the diff of this file is not supported yet
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
0
31262