-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit for the Token Synchronizer
- Loading branch information
1 parent
9ba1718
commit c243630
Showing
37 changed files
with
5,081 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
**/.eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Node | ||
*.log | ||
*.log.* | ||
node_modules | ||
|
||
out/ | ||
dist/ | ||
code.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Below are the steps to get your widget running. You can also find instructions at: | ||
|
||
https://www.figma.com/widget-docs/setup-guide/ | ||
|
||
This widget template uses TypeScript and NPM, two standard tools in creating JavaScript applications. | ||
|
||
First, download Node.js which comes with NPM. This will allow you to install TypeScript and other | ||
libraries. You can find the download link here: | ||
|
||
https://nodejs.org/en/download/ | ||
|
||
Next, install TypeScript, esbuild and the latest type definitions by running: | ||
|
||
npm install | ||
|
||
If you are familiar with JavaScript, TypeScript will look very familiar. In fact, valid JavaScript code | ||
is already valid Typescript code. | ||
|
||
TypeScript adds type annotations to variables. This allows code editors such as Visual Studio Code | ||
to provide information about the Figma API while you are writing code, as well as help catch bugs | ||
you previously didn't notice. | ||
|
||
For more information, visit https://www.typescriptlang.org/ | ||
|
||
Using TypeScript requires a compiler to convert TypeScript (widget-src/code.tsx) into JavaScript (dist/code.js) | ||
for the browser to run. We use esbuild to do this for us. | ||
|
||
We recommend writing TypeScript code using Visual Studio code: | ||
|
||
1. Download Visual Studio Code if you haven't already: https://code.visualstudio.com/. | ||
2. Open this directory in Visual Studio Code. | ||
3. Compile TypeScript to JavaScript: Run the "Terminal > Run Build Task..." menu item, | ||
then select "npm: watch". You will have to do this again every time | ||
you reopen Visual Studio Code. | ||
|
||
That's it! Visual Studio Code will regenerate the JavaScript file every time you save. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Radius Token Synchronizer", | ||
"id": "000", | ||
"api": "1.0.0", | ||
"main": "dist/code.js", | ||
"ui": "./dist/index.html", | ||
"capabilities": [], | ||
"enableProposedApi": false, | ||
"editorType": ["figma"], | ||
"containsWidget": true, | ||
"widgetApi": "1.0.0", | ||
"networkAccess": { | ||
"allowedDomains": ["https://github.com"] | ||
}, | ||
"documentAccess": "dynamic-page" | ||
} |
Oops, something went wrong.