Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

figmagic

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

figmagic - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

34

bin/getImages.js

@@ -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);

4

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc