Coder Social home page Coder Social logo

six7 / figma-assets-generator Goto Github PK

View Code? Open in Web Editor NEW
90.0 3.0 10.0 712 KB

Creates assets (SVG, JPG, PNG) from a figma document (e.g. a "Icons" page in one of your files) and places them locally in a folder.

JavaScript 100.00%
figma figma-api figmadesign figma-js icons

figma-assets-generator's Introduction

Hi there ๐Ÿ‘‹

I'm a designer with a high interest in creating tools and plugins that enable others to do their best work. I currently work at GitHub as a Senior Product Designer.

Want to support my work?

If you want to sponsor me financially you can do so on GitHub, Buy me a coffee or on Patreon.

figma-assets-generator's People

Contributors

dependabot[bot] avatar imirdzhamolov avatar six7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

figma-assets-generator's Issues

Fix text layer bag (i have more screenshot for you)

Hello, for better demonstration, I attached screenshots.

I created a text layer with settings a) without bug Roboto 16/16, b) with bug Roboto 16/24. In the two screens, you will see this setting and different text layer sizes.

1
2

After creating the auto layout to the emitter button, you will see different sizes of a button.

3
4

This error is misleading since the spaces are different, if I want to recreate after the layout of the site then the button will be displayed as in a layer without error. please correct the addition of extra space around the text layer, the indentation (line-height) should appear only on a new line and not around the circle of the layer. For example, there is no such problem in Photoshop, below is the screen

5

I hope you understand this bug and fix it soon

Unhandled promise rejection error

Hi there! I've been using this library consistently for the last few months and it's working great. However, sometimes, I see these errors during export, so some of the assets fail. Have you seen this on your side? Can something be done in the script to handle these errors? Would appreciate your help.

at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:428:9)
    at TLSSocket.emit (events.js:314:20)
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:424:5)
    at onwrite (_stream_writable.js:445:5)
    at internal/streams/destroy.js:50:7
    at TLSSocket.Socket._destroy (net.js:681:5)
    at TLSSocket.destroy (internal/streams/destroy.js:38:8)
(node:32097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 8)
(node:32097) UnhandledPromiseRejectionWarning: FetchError: request to https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/9bbe/6291/ebac3fc3bc48cbabf61f0d4766eb6eaa failed, reason: write EPROTO
    at ClientRequest.<anonymous> (/Users/.../node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:428:9)
    at TLSSocket.emit (events.js:314:20)
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:424:5)
    at onwrite (_stream_writable.js:445:5)
    at internal/streams/destroy.js:50:7
    at TLSSocket.Socket._destroy (net.js:681:5)
    at TLSSocket.destroy (internal/streams/destroy.js:38:8)
(node:32097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9)
(node:32097) UnhandledPromiseRejectionWarning: FetchError: request to https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/7dbd/6983/83f49161f916bd75e1a9e23f9e06af9b failed, reason: write EPROTO
    at ClientRequest.<anonymous> (/Users/.../node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:428:9)
    at TLSSocket.emit (events.js:314:20)
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:424:5)
    at onwrite (_stream_writable.js:445:5)
    at internal/streams/destroy.js:50:7
    at TLSSocket.Socket._destroy (net.js:681:5)
    at TLSSocket.destroy (internal/streams/destroy.js:38:8)
(node:32097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 10)
(node:32097) UnhandledPromiseRejectionWarning: FetchError: request to https://s3-us-west-2.amazonaws.com/figma-alpha-api/img/7375/d6a6/6e7246f9768ebf0ff794c19620dce142 failed, reason: read ECONNRESET
    at ClientRequest.<anonymous> (/Users/.../node_modules/node-fetch/lib/index.js:1455:11)
    at ClientRequest.emit (events.js:314:20)
    at TLSSocket.socketErrorListener (_http_client.js:428:9)
    at TLSSocket.emit (events.js:314:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
(node:32097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11)

How to get the fileID?

Hi there,

This package is really promising and the only thing that is not clear on this concept is where to find the fileID.

If you could explain detailed where we users could find it will be great.

Kind regards,

Fernando Fas

PDF export

Thanks for the script! The docs don't mention support for PDF extension but I tried it and it does technically export. However, the exported size doesn't match the size of my component's frame. When I export manually, the size is correct. But via the script, the size matches the bounds of my vector paths. Do you know why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.