customize-write-files
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -6,2 +6,6 @@ # Change Log | ||
<a name="current-release"></a> | ||
# Version 2.0.1 (Fri, 21 Apr 2017 08:20:48 GMT) | ||
* [729a95d](https://github.com/bootprint/customize-write-files/commit/729a95d) Handle undefined engine results gracefully - Nils Knappmeier | ||
# Version 2.0.0 (Sun, 09 Apr 2017 20:20:51 GMT) | ||
@@ -8,0 +12,0 @@ |
22
index.js
@@ -118,12 +118,14 @@ /*! | ||
var files = customizeResult[engineName] | ||
Object.keys(files).forEach(function (filename) { | ||
// Existing file in different engine | ||
var existingFile = result[filename] | ||
if (existingFile) { | ||
throw new Error( | ||
util.format('File "%s" occurs in two engines: "%s" and "%s"', filename, existingFile.engine, engineName) | ||
) | ||
} | ||
result[filename] = { engine: engineName, contents: files[filename] } | ||
}) | ||
if (files) { | ||
Object.keys(files).forEach(function (filename) { | ||
// Existing file in different engine | ||
var existingFile = result[filename] | ||
if (existingFile) { | ||
throw new Error( | ||
util.format('File "%s" occurs in two engines: "%s" and "%s"', filename, existingFile.engine, engineName) | ||
) | ||
} | ||
result[filename] = { engine: engineName, contents: files[filename] } | ||
}) | ||
} | ||
}) | ||
@@ -130,0 +132,0 @@ return result |
{ | ||
"name": "customize-write-files", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Post-processor that stores the result of a customize-run in a local directory", | ||
@@ -5,0 +5,0 @@ "repository": { |
16880
279