[API] Fix whitespace of bundle rewrites

This commit is contained in:
Victor Woeltjen 2016-01-07 10:45:00 -08:00
parent 9ebafa157b
commit 792fda48e3

View File

@ -7,7 +7,9 @@ var glob = require('glob'),
function indent(str) { function indent(str) {
return str.split('\n').map(function (line, index) { return str.split('\n').map(function (line, index) {
return index === 0 ? line : (' ' + line); return index === 0 ? line : (' ' + line);
}).filter(function (line) {
return line.trim().length > 0;
}).join('\n'); }).join('\n');
} }
@ -17,7 +19,7 @@ function rebundle(file) {
outputFile = file.replace(".json", ".js"), outputFile = file.replace(".json", ".js"),
contents = [ contents = [
header, header,
"legacyRegistry.register(\"", " legacyRegistry.register(\"",
bundleName, bundleName,
"\", ", "\", ",
indent(plainJson), indent(plainJson),