-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from freemansoft/feature/support-json-file-sets
support sets of JSON files
- Loading branch information
Showing
56 changed files
with
13,542 additions
and
113 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
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
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 |
---|---|---|
@@ -1,16 +1,9 @@ | ||
# example | ||
# figma2flutter example application. | ||
|
||
A new Flutter project. | ||
Sample flutter app that demonstrates creating theme from design tokens and using that theme in a simple application. | ||
|
||
## Getting Started | ||
|
||
This project is a starting point for a Flutter application. | ||
1. This application uses the generated themes located in [lib/generated](lib/generated). | ||
1. The theme was generated using the [script](bin/update-tokens.sh) and [example-themes.json](bin/example-themes.json) definitions in the [bin](bin) directory. Comments in the script describe how to execute it. The script and json files are outside of teh lib directory because the app will only include the generated dart files and not the design token json files. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
|
||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) | ||
|
||
For help getting started with Flutter development, view the | ||
[online documentation](https://docs.flutter.dev/), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. |
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
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
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
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,14 @@ | ||
An example without an app that demonstrates mult-file Json design tokens. | ||
Complete Design Token defitions are often delivered as multiple definition files that are stitched together to provide complete definitions. | ||
The merged information from multiple files exactly matches the structure of a set of design tokens defined in a single file. | ||
|
||
## Running example2 | ||
|
||
Run the following from the example2 directory or run the script in bin. It will generate token defition classes | ||
|
||
`dart ..\bin\figma2flutter.dart -i .\bin\tokens\ -o .\lib\generated\` | ||
|
||
## Assumptions | ||
1. `bin\tokens` contains some number of design token json files and contorl files. | ||
1. `$metadata.json` file that describes the locations of all the files to include. | ||
1. `$themes.json` that describes the themes and which json files are included in each theme. |
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,22 @@ | ||
{ | ||
"tokenSetOrder": [ | ||
"global", | ||
"semantic", | ||
"comp/button", | ||
"comp/list-item", | ||
"comp/menu-item", | ||
"comp/toggle", | ||
"pattern/menu-bar", | ||
"pattern/feature", | ||
"pattern/card-user", | ||
"pattern/card-pricing", | ||
"sections/nav", | ||
"sections/hero", | ||
"sections/features", | ||
"sections/team", | ||
"sections/pricing", | ||
"sections/footer", | ||
"theme/light", | ||
"theme/dark" | ||
] | ||
} |
Oops, something went wrong.