balloon-generator
Advanced tools
Comparing version 0.9.3 to 0.9.4
@@ -42,6 +42,12 @@ var fs = require('fs'); | ||
} else if (program.serve && BUILD_PATH) { | ||
watch(SOURCE_PATH, BUILD_PATH, function (err, changedPath) { | ||
if (err) { return console.log('Failed to watch files:', err); } | ||
// Reload the things | ||
// TODO: Move this somewhere else | ||
BALLOON_CONFIG = getConfig(CONFIG_PATH); | ||
SOURCE_PATH = program.source || BALLOON_CONFIG.source; | ||
BUILD_PATH = program.output || BALLOON_CONFIG.build; | ||
CONTENT_PATH = path.join(SOURCE_PATH, 'content'); | ||
rimraf(BUILD_PATH, function (err) { | ||
@@ -105,3 +111,2 @@ if (err) { return console.log('Failed wipe build directory:', err); } | ||
_ext: pageExt, | ||
_title: pageTitle === 'index' ? '' : pageTitle, | ||
_slug: pageSlug, | ||
@@ -112,8 +117,12 @@ _created: extractDateFromPath(pagePath) | ||
if (pagePath.indexOf('index.html') >= 0 || pagePath.indexOf('rss.xml') >= 0) { | ||
// This is an archive page | ||
lastPages.push(pageConfig); | ||
continue; | ||
} else { | ||
// This is a content page | ||
pageCount++; | ||
pageConfig._title = pageTitle; | ||
} | ||
render(defaults, sourcePath, buildPath, pageConfig, null, function (err, localPageConfig) { | ||
@@ -120,0 +129,0 @@ if (err) { return console.log('Failed to render', pageConfig._path, err); } |
{ | ||
"name": "balloon-generator", | ||
"version": "0.9.3", | ||
"version": "0.9.4", | ||
"description": "Basic static site generator", | ||
@@ -5,0 +5,0 @@ "scripts": {}, |
20808
370