5.0.1 • Published 1 month ago

@figma-export/cli v5.0.1

Weekly downloads
362
License
MIT
Repository
github
Last release
1 month ago

@figma-export/cli

Command line for @figma-export.

Install

While you can install it globally on your machine, it's much better to install it locally project by project.

npm install --save-dev @figma-export/cli

Note: If you do not have a package.json, create one before installing or run npm init -y to automatically create ones.

Usage

export FIGMA_TOKEN=<personalAccessToken>

npx figma-export COMMAND

Note: These instructions use the npx command to run the locally installed executables. You can drop it inside of an npm run script or you may instead execute with the relative path instead. ./node_modules/.bin/figma-export

Commands

help

npx figma-export help

use-config

This command is well-explained into the project README. Look at advanced section.

components

Exports components from a Figma file

npx figma-export components FILEID

# help
npx figma-export help components

transformers

--transformer -T option

npx figma-export components FILEID -T TRANSFORMER

A transform function receives an SVG and turns it into something new.

You can create you own:

// with promise
module.exports = options => {
    return (svg) => new Promise((resolve, reject) => {
        resolve(svg);
    });
}
// with async/await
module.exports = options => {
    return async (svg) => {
        return svg;
    };
}

or install an official transformer:

PackageVersion
@figma-export/transform-svg-with-svgonpm

outputters

--outputter -O option

npx figma-export components FILEID -O OUTPUTTER

An output function receives a list of pages, in which each page contains components.

You can create you own:

module.exports = options => {
    return async pages => {
        console.clear();
        console.log(JSON.stringify(pages));
    };
}

or install an official outputter:

PackageVersion
@figma-export/output-components-as-es6npm
@figma-export/output-components-as-stdoutnpm
@figma-export/output-components-as-svgnpm
@figma-export/output-components-as-svgstorenpm
6.0.0-beta.0

1 month ago

5.0.1

2 months ago

5.0.0

2 months ago

4.8.0

3 months ago

4.8.0-alpha.4

3 months ago

4.8.0-alpha.1

3 months ago

4.8.0-alpha.2

3 months ago

4.8.0-alpha.3

3 months ago

4.8.0-alpha.0

3 months ago

4.7.0

11 months ago

4.7.0-alpha.0

12 months ago

4.6.0

12 months ago

4.5.0

2 years ago

4.4.0

2 years ago

4.3.0

2 years ago

4.0.0-alpha.1

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.2.0

2 years ago

4.0.0-alpha.0

2 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.2

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.2.0-alpha.0

3 years ago

3.1.0

4 years ago

3.0.0

4 years ago

3.0.0-alpha.5

4 years ago

3.0.0-alpha.4

4 years ago

3.0.0-alpha.3

4 years ago

3.0.0-alpha.2

4 years ago

3.0.0-alpha.1

4 years ago

3.0.0-alpha.0

4 years ago

2.2.0

4 years ago

2.0.0

4 years ago

2.0.0-alpha.3

4 years ago

2.0.0-alpha.2

4 years ago

2.0.0-alpha.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.0.1-alpha.12

4 years ago

0.0.1-alpha.11

4 years ago

0.0.1-alpha.10

5 years ago

0.0.1-alpha.9

5 years ago

0.0.1-alpha.8

5 years ago

0.0.1-alpha.6

5 years ago

0.0.1-alpha.5

5 years ago

0.0.1-alpha.4

5 years ago

0.0.1-alpha.3

5 years ago

0.0.1-alpha.2

5 years ago

0.0.1-alpha.1

5 years ago

0.0.1-alpha.0

5 years ago