File tree Expand file tree Collapse file tree 4 files changed +22
-20
lines changed Expand file tree Collapse file tree 4 files changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ license-files = { paths = ["LICENSE"] }
6060[tool .hatch .envs .default ]
6161installer = " uv"
6262
63+ [project .scripts ]
64+ reactpy = " reactpy._console.cli:entry_point"
65+
6366[[tool .hatch .build .hooks .build-scripts .scripts ]]
6467# Note: `hatch` can't be called within `build-scripts` when installing packages in editable mode, so we have to write the commands long-form
6568commands = [
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ """Entry point for the ReactPy CLI."""
2+
3+ import click
4+
5+ from reactpy ._console .rewrite_props import rewrite_props
6+
7+
8+ @click .group ()
9+ @click .version_option (package_name = "reactpy" )
10+ def entry_point () -> None :
11+ pass
12+
13+
14+ entry_point .add_command (rewrite_props )
15+
16+
17+ if __name__ == "__main__" :
18+ entry_point ()
Original file line number Diff line number Diff line change 1818@click .command ()
1919@click .argument ("paths" , nargs = - 1 , type = click .Path (exists = True ))
2020def rewrite_props (paths : list [str ]) -> None :
21- """Rewrite snake_case props to camelCase in the specified paths """
21+ """Rewrite snake_case props to camelCase within <PATHS>. """
2222 for p in map (Path , paths ):
2323 # Process each file or recursively process each Python file in directories
2424 for f in [p ] if p .is_file () else p .rglob ("*.py" ):
You can’t perform that action at this time.
0 commit comments