Skip to content

Commit 329b8d8

Browse files
committed
docs: enhance documentation, specifications, and types across core modules
- Update @moduledoc documentation for Phoenix.React, Server, Cache, Helper, Runtime, and Monitoring modules - Add comprehensive examples, configuration guides, and performance considerations - Improve function documentation with detailed parameters and return values - Add proper @SPEC type specifications for all public functions - Include production deployment guidance and Telemetry integration examples - Document bundle size optimization achievements (67% reduction) - Enhance error handling and monitoring documentation - Add comprehensive usage patterns and best practices BREAKING CHANGE: None - documentation only updates
1 parent 57164a4 commit 329b8d8

File tree

14 files changed

+493
-173
lines changed

14 files changed

+493
-173
lines changed

lib/phoenix/mix/build/bun.ex

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ defmodule Mix.Tasks.Phx.React.Bun.Bundle do
1717
@shortdoc "Bundle components into server.js"
1818
def run(args) do
1919
{opts, _argv} =
20-
OptionParser.parse!(args, strict: [component_base: :string, output: :string, cd: :string, development: :boolean])
20+
OptionParser.parse!(args,
21+
strict: [component_base: :string, output: :string, cd: :string, development: :boolean]
22+
)
2123

2224
component_base = Keyword.get(opts, :component_base)
2325
base_dir = Path.absname(component_base, File.cwd!()) |> Path.expand()
@@ -65,15 +67,17 @@ defmodule Mix.Tasks.Phx.React.Bun.Bundle do
6567
]
6668

6769
# Add production optimizations unless in development mode
68-
build_args = if is_dev do
69-
build_args
70-
else
71-
build_args ++ [
72-
"--minify",
73-
"--sourcemap=external",
74-
"--define=process.env.NODE_ENV=\"production\""
75-
]
76-
end
70+
build_args =
71+
if is_dev do
72+
build_args
73+
else
74+
build_args ++
75+
[
76+
"--minify",
77+
"--sourcemap=external",
78+
"--define=process.env.NODE_ENV=\"production\""
79+
]
80+
end
7781

7882
{out, code} = System.cmd("bun", build_args, cd: cd)
7983

lib/phoenix/mix/build/deno.ex

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,20 @@ defmodule Mix.Tasks.Phx.React.Deno.Bundle do
9696
# Deno 2.x removed bundle, use compile instead
9797
# Add node-modules-dir flag for better npm package support
9898
{out, code} =
99-
System.cmd("deno", ["compile", "--output", output, "--allow-read", "--allow-env", "--allow-net", "--allow-write", tmp_file], cd: cd)
99+
System.cmd(
100+
"deno",
101+
[
102+
"compile",
103+
"--output",
104+
output,
105+
"--allow-read",
106+
"--allow-env",
107+
"--allow-net",
108+
"--allow-write",
109+
tmp_file
110+
],
111+
cd: cd
112+
)
100113

101114
# Clean up deno.json after compilation
102115
File.rm!(deno_json_path)

0 commit comments

Comments
 (0)