Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
support for dotenv variables (#7)
Browse files Browse the repository at this point in the history
* dotenv variables added

* added .env info on README
  • Loading branch information
0000marcell authored and MatthewDailey committed May 7, 2018
1 parent 56fec1d commit 018f673
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions figma-to-react/.env
@@ -0,0 +1 @@
DEV_TOKEN=<YOUR_TOKEN>
13 changes: 13 additions & 0 deletions figma-to-react/README.md
Expand Up @@ -41,6 +41,19 @@ node main.js VGULlnz44R0Ooe4FZKDxlhh4 <API_TOKEN_HERE>

where `<API_TOKEN_HERE>` would be repaced with your developer token.

You can also change the .env file and insert your token there

```
//.env
DEV_TOKEN=<YOUR_TOKEN>
```
then you only need to pass the project id
```
node main.js VGULlnz44R0Ooe4FZKDxlhh4
```



*IMPORTANT*: The index.css file is required to be included for components to render completely.

## Variables
Expand Down
1 change: 1 addition & 0 deletions figma-to-react/main.js
@@ -1,3 +1,4 @@
require('dotenv').config()
const fetch = require('node-fetch');
const fs = require('fs');
const figma = require('./lib/figma');
Expand Down
14 changes: 14 additions & 0 deletions figma-to-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions figma-to-react/package.json
Expand Up @@ -15,5 +15,8 @@
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"dotenv": "^5.0.1"
}
}

0 comments on commit 018f673

Please sign in to comment.