We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f406c6 commit af096c1Copy full SHA for af096c1
pyjsx/__main__.py
@@ -1,23 +1,5 @@
1
-import sys
2
-from pathlib import Path
3
-
4
-from pyjsx import transpile
5
6
7
-def transpile_file(f: Path) -> None:
8
- print("Transpiling", f) # noqa: T201
9
- source = f.read_text("utf-8")
10
- new_file = f.parent / f"{f.stem}_transpiled{f.suffix}"
11
- new_file.write_text(transpile(source))
+from pyjsx.cli import cli
12
13
14
if __name__ == "__main__":
15
- for p in sys.argv[1:]:
16
- path = Path(p)
17
- if not path.exists():
18
- continue
19
- if path.is_dir():
20
- for f in path.rglob("*.py"):
21
- transpile_file(f)
22
- else:
23
- transpile_file(path)
+ cli()
0 commit comments