@zeplin/cli
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "@zeplin/cli", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Zeplin CLI", | ||
@@ -5,0 +5,0 @@ "main": "./dist/src/app", |
@@ -73,11 +73,13 @@ "use strict"; | ||
}); | ||
const removeEmptyFields = (componentData) => { | ||
if (typeof componentData.description === "undefined" || componentData.description.trim() === "") { | ||
delete componentData.description; | ||
const convertToData = (plugin, componentData) => { | ||
const copyComponentData = Object.assign({}, componentData); | ||
if (typeof copyComponentData.description === "undefined" || copyComponentData.description.trim() === "") { | ||
delete copyComponentData.description; | ||
} | ||
if (typeof componentData.snippet === "undefined" || componentData.snippet.trim() === "") { | ||
delete componentData.snippet; | ||
delete componentData.lang; | ||
if (typeof copyComponentData.snippet === "undefined" || copyComponentData.snippet.trim() === "") { | ||
delete copyComponentData.snippet; | ||
delete copyComponentData.lang; | ||
} | ||
return componentData; | ||
delete copyComponentData.links; | ||
return Object.assign({ plugin }, copyComponentData); | ||
}; | ||
@@ -101,3 +103,3 @@ const processLink = (link) => { | ||
const componentData = yield plugin.process(component); | ||
data.push(Object.assign({ plugin: plugin.name }, removeEmptyFields(componentData))); | ||
data.push(convertToData(plugin.name, componentData)); | ||
(_b = componentData.links) === null || _b === void 0 ? void 0 : _b.forEach(link => urlPaths.push(processLink(link))); | ||
@@ -104,0 +106,0 @@ logger_1.default.debug(`${plugin.name} processed ${component.path}: ${componentData}`); |
{ | ||
"name": "@zeplin/cli", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Zeplin CLI", | ||
@@ -5,0 +5,0 @@ "main": "./dist/src/app", |
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
216293
3886