From 62308494c04895573a08af733ceba8efb92e5aea Mon Sep 17 00:00:00 2001 From: Geoffrey Pursell Date: Thu, 4 Aug 2016 16:28:48 -0500 Subject: [PATCH 1/2] silly end-of-line whitespace changes that my editor made on its own --- core/lib/patternlab.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/lib/patternlab.js b/core/lib/patternlab.js index d721de09f..2ad9b70f0 100644 --- a/core/lib/patternlab.js +++ b/core/lib/patternlab.js @@ -1,10 +1,10 @@ -/* - * patternlab-node - v2.3.0 - 2016 - * +/* + * patternlab-node - v2.3.0 - 2016 + * * Brian Muenzenmeyer, Geoff Pursell, and the web community. - * Licensed under the MIT license. - * - * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. + * Licensed under the MIT license. + * + * Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice. * */ From bd8b602326eecf4675de300fd587be45fef043db Mon Sep 17 00:00:00 2001 From: Geoffrey Pursell Date: Fri, 5 Aug 2016 14:46:30 -0500 Subject: [PATCH 2/2] If the user-editable header and footer are not found, print a descriptive error message and exit immediately. --- core/lib/patternlab.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/core/lib/patternlab.js b/core/lib/patternlab.js index 2ad9b70f0..e38833aee 100644 --- a/core/lib/patternlab.js +++ b/core/lib/patternlab.js @@ -244,19 +244,17 @@ var patternlab_engine = function (config) { patternlab.userHead = fs.readFileSync(path.resolve(paths.source.meta, '_00-head.mustache'), 'utf8'); } catch (ex) { - if (patternlab.config.debug) { - console.log(ex); - console.log('Could not find optional user-defined header, usually found at ./source/_meta/_00-head.mustache. It was likely deleted.'); - } + console.log('\nWARNING: Could not find the user-editable header template, currently configured to be at ' + path.join(config.paths.source.meta, '_00-head.mustache') + '. Your configured path may be incorrect (check paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.\n'); + if (patternlab.config.debug) { console.log(ex); } + process.exit(1); } try { patternlab.userFoot = fs.readFileSync(path.resolve(paths.source.meta, '_01-foot.mustache'), 'utf8'); } catch (ex) { - if (patternlab.config.debug) { - console.log(ex); - console.log('Could not find optional user-defined footer, usually found at ./source/_meta/_01-foot.mustache. It was likely deleted.'); - } + console.log('\nWARNING: Could not find the user-editable footer template, currently configured to be at ' + path.join(config.paths.source.meta, '_01-foot.mustache') + '. Your configured path may be incorrect (check paths.source.meta in your config file), the file may have been deleted, or it may have been left in the wrong place during a migration or update.\n'); + if (patternlab.config.debug) { console.log(ex); } + process.exit(1); } //now that all the main patterns are known, look for any links that might be within data and expand them