Comparing version 0.2.1 to 0.2.2
@@ -25,4 +25,2 @@ const fs = require('fs'); | ||
const componentName = Object.keys(resolvedImages)[indexInner]; | ||
//console.log('Matched ' + imgId + ' @ ' + index); | ||
//console.log(Object.keys(resolvedImages)[index]); | ||
namedComponentsWithImages[componentName] = imageUrl; | ||
@@ -33,32 +31,2 @@ } | ||
/* BUG | ||
** _body.images and resolvedImages do not align in indexes, thus ending in images with wrong names | ||
*/ | ||
/* | ||
Object.keys(_body.images).forEach((key, index) => { | ||
const componentName = Object.keys(resolvedImages)[index]; | ||
console.log( | ||
Object.values(_body.images)[index], | ||
Object.keys(resolvedImages)[index], | ||
Object.values(resolvedImages)[index] | ||
); | ||
namedComponentsWithImages[componentName] = Object.values(_body.images)[index]; // Object.values(resolvedImages)[index]; | ||
}); | ||
*/ | ||
/* | ||
Object.keys(_body.images).forEach((key, index) => { | ||
const componentName = Object.keys(resolvedImages)[index]; | ||
console.log( | ||
Object.values(_body.images)[index], | ||
Object.keys(resolvedImages)[index], | ||
Object.values(resolvedImages)[index] | ||
); | ||
namedComponentsWithImages[componentName] = Object.values(_body.images)[index]; // Object.values(resolvedImages)[index]; | ||
}); | ||
*/ | ||
//console.log(namedComponentsWithImages); | ||
/* TODO: | ||
@@ -72,3 +40,3 @@ ** Use ./writeFile.js instead? | ||
'utf-8', | ||
function (error) { | ||
function(error) { | ||
if (error) { | ||
@@ -75,0 +43,0 @@ return console.log(error); |
{ | ||
"name": "figmagic", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"author": "Mikael Vesavuori", | ||
@@ -16,3 +16,3 @@ "main": "index.js", | ||
"figmagic:clean": "rm -rf specs/ && rm -rf tokens/ && rm -rf figma", | ||
"figmagic:saveFromApi": "mkdir -p figma && wget 'https://api.figma.com/v1/files/KLLDK9CBSg7eAayiTY3kVqC8' --header='X-Figma-Token: 363-7526bfc3-cb4d-487e-80fe-461679ae1470' -O figma/figma.json", | ||
"figmagic:saveFromApi": "mkdir -p figma && wget 'https://api.figma.com/v1/files/{FILE}' --header='X-Figma-Token: {TOKEN}' -O figma/figma.json", | ||
"figmagic:tokens": "yarn figmagic:clean && yarn figmagic:saveFromApi && yarn figmagic:build", | ||
@@ -19,0 +19,0 @@ "figmagic:build": "node $npm_package_config_figmagicPath/bin/index.js", |
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
22972
543