-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
# generateStaticFigmaFile
_Internal utility script (not published)_
A helper tool to download a Figma Frame as an API response JSON file and a rendered SVG image file.
## Usage
```sh
$ yarn generate-static-figma-file -t <Figma Personall Access Token> -u <Figma file URL> -o <Output directory>
# You can also invoke by below
$ yarn workspace @figspec/generate-static-figma-file generate <...args>
# or this
$ cd scripts/generateStaticFigmaFile
$ yarn generate <...args>
```
This script loads `.env` file at the root of the repository with `dotenv` package.
If the `--token` option is absent, the script will use environment variable `FIGMA_TOKEN` instead.
```
# <repo root>/.env
FIGMA_TOKEN=<Figma Personal Access Token>
```
```sh
$ yarn generate-static-figma-file <...args except --token>
```
For more information, please refer tool's help.
```sh
$ yarn generate-static-figma-file --help
```