-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
124 changed files
with
4,211 additions
and
1,809 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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,13 @@ | ||
# Fyx cli commands | ||
|
||
## `dart run cli` | ||
|
||
Exports all icons from all widgets into the HTML file for inspection. | ||
|
||
```shell | ||
$ cd cli/icons/ | ||
$ dart run | ||
``` | ||
|
||
Exported file is in `cli/icons/dist/index.html`. | ||
|
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,7 @@ | ||
# Files and directories created by pub. | ||
.dart_tool/ | ||
.packages | ||
|
||
# Conventional directory for build output. | ||
dist/* | ||
dist/!.gitkeep |
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 @@ | ||
# Defines a default set of lint rules enforced for projects at Google. For | ||
# details and rationale, see | ||
# https://github.com/dart-lang/pedantic#enabled-lints. | ||
|
||
include: package:pedantic/analysis_options.yaml | ||
|
||
# For lint rules and documentation, see http://dart-lang.github.io/linter/lints. | ||
|
||
# Uncomment to specify additional rules. | ||
# linter: | ||
# rules: | ||
# - camel_case_types | ||
|
||
# analyzer: | ||
# exclude: | ||
# - path/to/excluded/files/** |
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,34 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:html/parser.dart'; | ||
|
||
void main(List<String> arguments) async { | ||
var dir = Directory('../../lib/'); | ||
var index = File('template.html'); | ||
var document = parse(index.readAsStringSync()); | ||
var icons = document.querySelector('#icons'); | ||
icons?.innerHtml = ''; | ||
|
||
await dir.list(recursive: true).forEach((file) { | ||
if (file.statSync().type == FileSystemEntityType.file) { | ||
var content = File(file.path).readAsStringSync(); | ||
var rx = RegExp( | ||
r'Icons\.([a-z0-9_]+)', | ||
caseSensitive: true, | ||
multiLine: true, | ||
); | ||
var matches = rx.allMatches(content); | ||
if (matches.isNotEmpty) { | ||
icons?.append(parseFragment('<h3 class="mt-5">${file.path}</h3>')); | ||
icons?.append(parseFragment(matches.map((match) { | ||
var iconId = match.group(1); | ||
iconId = iconId?.replaceAll(RegExp(r'(_outlined|_rounded|_thick)'), ''); | ||
return '<span class="d-flex mb-2">' | ||
'<span class="material-symbols-outlined me-3">$iconId</span>$iconId</span>'; | ||
}).join(''))); | ||
} | ||
} | ||
}); | ||
|
||
File('dist/index.html').writeAsStringSync(document.outerHtml); | ||
} |
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,12 @@ | ||
name: icons | ||
description: Export all icons from all Widgets in `lib` library to a HTML file. | ||
version: 1.0.0 | ||
|
||
environment: | ||
sdk: '>=2.12.0 <3.0.0' | ||
|
||
dependencies: | ||
html: ^0.15.0 | ||
|
||
dev_dependencies: | ||
pedantic: ^1.10.0 |
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,24 @@ | ||
<!DOCTYPE html><html lang="en"><head> | ||
<title>A Basic HTML5 Template</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="A simple HTML5 Template for new projects."> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0"> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin=""> | ||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet"> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous"> | ||
<style> | ||
body { font-family: 'Inter', sans-serif; } | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<div id="icons"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</body></html> |
Oops, something went wrong.