flet-cli 1.1.1__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. {flet_cli-1.1.1 → flet_cli-1.1.2}/PKG-INFO +3 -3
  2. {flet_cli-1.1.1 → flet_cli-1.1.2}/pyproject.toml +3 -3
  3. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/build_base.py +16 -0
  4. flet_cli-1.1.2/src/flet_cli/utils/web_fonts.py +64 -0
  5. flet_cli-1.1.2/src/flet_cli/version.py +1 -0
  6. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli.egg-info/PKG-INFO +3 -3
  7. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli.egg-info/SOURCES.txt +3 -1
  8. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli.egg-info/requires.txt +2 -2
  9. flet_cli-1.1.2/tests/test_web_fonts.py +80 -0
  10. flet_cli-1.1.1/src/flet_cli/version.py +0 -1
  11. {flet_cli-1.1.1 → flet_cli-1.1.2}/README.md +0 -0
  12. {flet_cli-1.1.1 → flet_cli-1.1.2}/setup.cfg +0 -0
  13. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/__init__.py +0 -0
  14. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/config.py +0 -0
  15. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/hook-flet.py +0 -0
  16. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/hook-flet_desktop.py +0 -0
  17. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/macos_utils.py +0 -0
  18. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py +0 -0
  19. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/rthooks.dat +0 -0
  20. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/utils.py +0 -0
  21. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/__pyinstaller/win_utils.py +0 -0
  22. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/cli.py +0 -0
  23. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/base.py +0 -0
  24. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/build.py +0 -0
  25. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/clean.py +0 -0
  26. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/create.py +0 -0
  27. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/debug.py +0 -0
  28. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/devices.py +0 -0
  29. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/doctor.py +0 -0
  30. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/emulators.py +0 -0
  31. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/flutter_base.py +0 -0
  32. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/mcp.py +0 -0
  33. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/options.py +0 -0
  34. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/pack.py +0 -0
  35. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/publish.py +0 -0
  36. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/run.py +0 -0
  37. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/serve.py +0 -0
  38. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/test.py +0 -0
  39. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/commands/test_host.py +0 -0
  40. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/android.py +0 -0
  41. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/android_sdk.py +0 -0
  42. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/app_excludes.py +0 -0
  43. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/cli.py +0 -0
  44. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/distros.py +0 -0
  45. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/examples.py +0 -0
  46. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/extension_settings.py +0 -0
  47. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/flutter.py +0 -0
  48. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/hash_stamp.py +0 -0
  49. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/ios_sign.py +0 -0
  50. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/jdk.py +0 -0
  51. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/linux_deps.py +0 -0
  52. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/log_format.py +0 -0
  53. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/macos_sign.py +0 -0
  54. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/merge.py +0 -0
  55. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/plist.py +0 -0
  56. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/processes.py +0 -0
  57. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/project_dependencies.py +0 -0
  58. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/pyodide.py +0 -0
  59. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/pyproject_toml.py +0 -0
  60. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/python_versions.py +0 -0
  61. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli/utils/template_cache.py +0 -0
  62. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli.egg-info/dependency_links.txt +0 -0
  63. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli.egg-info/entry_points.txt +0 -0
  64. {flet_cli-1.1.1 → flet_cli-1.1.2}/src/flet_cli.egg-info/top_level.txt +0 -0
  65. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_app_excludes.py +0 -0
  66. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_android.py +0 -0
  67. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_app_path.py +0 -0
  68. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_copy_output.py +0 -0
  69. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_icons.py +0 -0
  70. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_ios.py +0 -0
  71. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_linux.py +0 -0
  72. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_list_options.py +0 -0
  73. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_macos.py +0 -0
  74. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_macos_signing.py +0 -0
  75. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_package_cache.py +0 -0
  76. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_platform_settings.py +0 -0
  77. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_splash.py +0 -0
  78. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_svg.py +0 -0
  79. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_template.py +0 -0
  80. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_version.py +0 -0
  81. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_web_fonts.py +0 -0
  82. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_build_windows_arm64.py +0 -0
  83. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_clean.py +0 -0
  84. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_cli_pass_through_args.py +0 -0
  85. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_cli_positionals.py +0 -0
  86. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_create.py +0 -0
  87. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_extension_settings.py +0 -0
  88. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_find_platform_image.py +0 -0
  89. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_flutter.py +0 -0
  90. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_linux_desktop_entry.py +0 -0
  91. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_log_format.py +0 -0
  92. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_macos_sign.py +0 -0
  93. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_pack_extensions.py +0 -0
  94. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_plist.py +0 -0
  95. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_project_dependencies.py +0 -0
  96. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_pyodide_runtime.py +0 -0
  97. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_python_versions.py +0 -0
  98. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_run_assets_dir.py +0 -0
  99. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_run_desktop_dependency.py +0 -0
  100. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_run_script_args.py +0 -0
  101. {flet_cli-1.1.1 → flet_cli-1.1.2}/tests/test_run_watcher_unavailable.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-cli
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Flet CLI
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -9,8 +9,8 @@ Project-URL: Repository, https://github.com/flet-dev/flet
9
9
  Project-URL: Documentation, https://flet.dev/docs
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: flet==1.1.1
13
- Requires-Dist: flet-platform-assets==1.1.1
12
+ Requires-Dist: flet==1.1.2
13
+ Requires-Dist: flet-platform-assets==1.1.2
14
14
  Requires-Dist: watchdog>=4.0.0
15
15
  Requires-Dist: packaging>=25.0
16
16
  Requires-Dist: qrcode>=7.4.2
@@ -1,14 +1,14 @@
1
1
  [project]
2
2
  name = "flet-cli"
3
- version = "1.1.1"
3
+ version = "1.1.2"
4
4
  description = "Flet CLI"
5
5
  authors = [{ name = "Appveyor Systems Inc.", email = "hello@flet.dev" }]
6
6
  license = "Apache-2.0"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
- "flet==1.1.1",
11
- "flet-platform-assets==1.1.1",
10
+ "flet==1.1.2",
11
+ "flet-platform-assets==1.1.2",
12
12
  "watchdog >=4.0.0",
13
13
  "packaging >=25.0",
14
14
  "qrcode >=7.4.2",
@@ -88,6 +88,7 @@ from flet_cli.utils.python_versions import (
88
88
  UnsupportedPythonVersionError,
89
89
  resolve_python_version,
90
90
  )
91
+ from flet_cli.utils.web_fonts import defer_web_fonts
91
92
 
92
93
  DEFAULT_TEMPLATE_URL = (
93
94
  "https://github.com/flet-dev/flet/releases/download/"
@@ -4055,6 +4056,7 @@ class BaseBuildCommand(BaseFlutterCommand):
4055
4056
 
4056
4057
  if self.target_platform == "web":
4057
4058
  self.prune_cdn_assets()
4059
+ self.defer_web_fonts()
4058
4060
  if self.assets_path.exists():
4059
4061
  # copy `assets` directory contents to the output directory
4060
4062
  copy_tree(str(self.assets_path), str(self.out_dir))
@@ -4063,6 +4065,20 @@ class BaseBuildCommand(BaseFlutterCommand):
4063
4065
 
4064
4066
  console.log(f"Copied build {self.emojis['checkmark']}")
4065
4067
 
4068
+ def defer_web_fonts(self):
4069
+ """
4070
+ Load the fonts only some controls need on first use, and drop the
4071
+ unused ones (see `flet_cli.utils.web_fonts`).
4072
+ """
4073
+ deferred, unused = defer_web_fonts(self.out_dir)
4074
+ if self.verbose > 0 and (deferred or unused):
4075
+ console.log(
4076
+ f"Fonts loaded on first use: {', '.join(deferred) or 'none'}; "
4077
+ f"removed: {', '.join(unused) or 'none'}",
4078
+ style=verbose1_style,
4079
+ markup=False,
4080
+ )
4081
+
4066
4082
  def prune_cdn_assets(self):
4067
4083
  """
4068
4084
  Remove `canvaskit/` from a CDN-mode web build.
@@ -0,0 +1,64 @@
1
+ """Fonts of a `flet build web` app that are loaded on first use, or not at all.
2
+
3
+ Flutter web downloads every font in `assets/FontManifest.json` before the
4
+ app's first frame. Some Dart packages bring fonts only a few controls need:
5
+ their families move to `assets/DeferredFontManifest.json` (the same format),
6
+ and the flet package loads them the first time such a control is built
7
+ (`packages/flet/lib/src/utils/deferred_fonts.dart`). Families no Flet control
8
+ uses are left out of the build.
9
+
10
+ Run by `flet build web`, and by CI on Flet's built-in web client (flet-web,
11
+ served by `flet run --web` and copied by `flet publish`).
12
+ """
13
+
14
+ import json
15
+ import re
16
+ from pathlib import Path
17
+
18
+ DEFERRED_FONT_MANIFEST = "DeferredFontManifest.json"
19
+
20
+ # Dart packages whose fonts are loaded on first use:
21
+ # - flutter_math_fork: KaTeX, for math in `Markdown`;
22
+ # - lucide_icons_flutter: Lucide, for flet-shadcn-ui's icons;
23
+ # - shadcn_ui: Geist and Geist Mono, for flet-shadcn-ui's text.
24
+ DEFERRED_FONT_PACKAGES = ("flutter_math_fork", "lucide_icons_flutter", "shadcn_ui")
25
+
26
+ # lucide_icons_flutter's weight variants (2.9 MB): flet-shadcn-ui maps every
27
+ # icon to the regular `Lucide` family.
28
+ UNUSED_FONT_FAMILIES = re.compile(r"packages/lucide_icons_flutter/Lucide\d00")
29
+
30
+
31
+ def defer_web_fonts(web_dir: Path) -> tuple[list[str], list[str]]:
32
+ """
33
+ Split the fonts of the web build in `web_dir`: deferred families go to
34
+ `DeferredFontManifest.json`, unused ones are removed with their files.
35
+
36
+ Returns the deferred and the removed family names. A build without
37
+ `FontManifest.json` is left alone.
38
+ """
39
+
40
+ assets = web_dir / "assets"
41
+ manifest_path = assets / "FontManifest.json"
42
+ if not manifest_path.exists():
43
+ return [], []
44
+
45
+ families = json.loads(manifest_path.read_text(encoding="utf-8"))
46
+ kept, deferred, unused = [], [], []
47
+ for family in families:
48
+ name = family.get("family", "")
49
+ if UNUSED_FONT_FAMILIES.fullmatch(name):
50
+ unused.append(family)
51
+ elif any(name.startswith(f"packages/{p}/") for p in DEFERRED_FONT_PACKAGES):
52
+ deferred.append(family)
53
+ else:
54
+ kept.append(family)
55
+
56
+ manifest_path.write_text(json.dumps(kept), encoding="utf-8")
57
+ (assets / DEFERRED_FONT_MANIFEST).write_text(json.dumps(deferred), encoding="utf-8")
58
+ for family in unused:
59
+ for font in family.get("fonts", []):
60
+ # The manifest's paths are URL-encoded, as Flutter writes them,
61
+ # and so are the file names: `Geist%5Bwght%5D.ttf`.
62
+ (assets / font["asset"]).unlink(missing_ok=True)
63
+
64
+ return [f["family"] for f in deferred], [f["family"] for f in unused]
@@ -0,0 +1 @@
1
+ version = "1.1.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-cli
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Flet CLI
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -9,8 +9,8 @@ Project-URL: Repository, https://github.com/flet-dev/flet
9
9
  Project-URL: Documentation, https://flet.dev/docs
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: flet==1.1.1
13
- Requires-Dist: flet-platform-assets==1.1.1
12
+ Requires-Dist: flet==1.1.2
13
+ Requires-Dist: flet-platform-assets==1.1.2
14
14
  Requires-Dist: watchdog>=4.0.0
15
15
  Requires-Dist: packaging>=25.0
16
16
  Requires-Dist: qrcode>=7.4.2
@@ -57,6 +57,7 @@ src/flet_cli/utils/pyodide.py
57
57
  src/flet_cli/utils/pyproject_toml.py
58
58
  src/flet_cli/utils/python_versions.py
59
59
  src/flet_cli/utils/template_cache.py
60
+ src/flet_cli/utils/web_fonts.py
60
61
  tests/test_app_excludes.py
61
62
  tests/test_build_android.py
62
63
  tests/test_build_app_path.py
@@ -93,4 +94,5 @@ tests/test_python_versions.py
93
94
  tests/test_run_assets_dir.py
94
95
  tests/test_run_desktop_dependency.py
95
96
  tests/test_run_script_args.py
96
- tests/test_run_watcher_unavailable.py
97
+ tests/test_run_watcher_unavailable.py
98
+ tests/test_web_fonts.py
@@ -1,5 +1,5 @@
1
- flet==1.1.1
2
- flet-platform-assets==1.1.1
1
+ flet==1.1.2
2
+ flet-platform-assets==1.1.2
3
3
  watchdog>=4.0.0
4
4
  packaging>=25.0
5
5
  qrcode>=7.4.2
@@ -0,0 +1,80 @@
1
+ """`flet build web` defers the fonts only some controls need and drops unused ones."""
2
+
3
+ import json
4
+
5
+ from flet_cli.utils.web_fonts import DEFERRED_FONT_MANIFEST, defer_web_fonts
6
+
7
+
8
+ def family(name, *assets):
9
+ return {"family": name, "fonts": [{"asset": a} for a in assets]}
10
+
11
+
12
+ MATERIAL = family("MaterialIcons", "fonts/MaterialIcons-Regular.otf")
13
+ ROBOTO = family("Roboto", "web/assets/fonts/roboto.woff2")
14
+ KATEX = family(
15
+ "packages/flutter_math_fork/KaTeX_Main",
16
+ "packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Main-Regular.ttf",
17
+ "packages/flutter_math_fork/lib/katex_fonts/fonts/KaTeX_Main-Bold.ttf",
18
+ )
19
+ LUCIDE = family(
20
+ "packages/lucide_icons_flutter/Lucide",
21
+ "packages/lucide_icons_flutter/assets/lucide.ttf",
22
+ )
23
+ GEIST = family(
24
+ "packages/shadcn_ui/Geist", "packages/shadcn_ui/fonts/Geist%5Bwght%5D.ttf"
25
+ )
26
+ LUCIDE_WEIGHTS = [
27
+ family(
28
+ f"packages/lucide_icons_flutter/Lucide{w}",
29
+ f"packages/lucide_icons_flutter/assets/build_font/LucideVariable-w{w}.ttf",
30
+ )
31
+ for w in range(100, 700, 100)
32
+ ]
33
+
34
+
35
+ def web_build(tmp_path, families):
36
+ assets = tmp_path / "assets"
37
+ for f in families:
38
+ for font in f["fonts"]:
39
+ path = assets / font["asset"]
40
+ path.parent.mkdir(parents=True, exist_ok=True)
41
+ path.write_bytes(b"font")
42
+ (assets / "FontManifest.json").write_text(json.dumps(families))
43
+ return assets
44
+
45
+
46
+ def read(path):
47
+ return json.loads(path.read_text())
48
+
49
+
50
+ def test_splits_the_manifest(tmp_path):
51
+ assets = web_build(
52
+ tmp_path, [MATERIAL, ROBOTO, KATEX, LUCIDE, GEIST, *LUCIDE_WEIGHTS]
53
+ )
54
+
55
+ deferred, unused = defer_web_fonts(tmp_path)
56
+
57
+ assert read(assets / "FontManifest.json") == [MATERIAL, ROBOTO]
58
+ assert read(assets / DEFERRED_FONT_MANIFEST) == [KATEX, LUCIDE, GEIST]
59
+ assert deferred == [KATEX["family"], LUCIDE["family"], GEIST["family"]]
60
+ assert unused == [f["family"] for f in LUCIDE_WEIGHTS]
61
+ # Deferred fonts stay in the build, unused ones are removed.
62
+ assert (assets / LUCIDE["fonts"][0]["asset"]).exists()
63
+ assert (assets / GEIST["fonts"][0]["asset"]).exists()
64
+ assert not list(
65
+ (assets / "packages/lucide_icons_flutter/assets/build_font").iterdir()
66
+ )
67
+
68
+
69
+ def test_without_deferred_fonts_writes_an_empty_list(tmp_path):
70
+ """The Dart side then reads an empty list instead of getting a 404."""
71
+ assets = web_build(tmp_path, [MATERIAL])
72
+
73
+ assert defer_web_fonts(tmp_path) == ([], [])
74
+ assert read(assets / "FontManifest.json") == [MATERIAL]
75
+ assert read(assets / DEFERRED_FONT_MANIFEST) == []
76
+
77
+
78
+ def test_build_without_a_manifest_is_left_alone(tmp_path):
79
+ assert defer_web_fonts(tmp_path) == ([], [])
80
+ assert not (tmp_path / "assets").exists()
@@ -1 +0,0 @@
1
- version = "1.1.1"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes