Fixes the formatting of generated JS files
(files: list[str], hide_output: bool = False)
| 122 | |
| 123 | |
| 124 | def trim(files: list[str], hide_output: bool = False) -> None: |
| 125 | """ |
| 126 | Fixes the formatting of generated JS files |
| 127 | """ |
| 128 | logger.debug("Trim generated files") |
| 129 | for file in files: |
| 130 | logger.debug(f"Updating {file}") |
| 131 | for expr in _TRIM_EXPRESSIONS: |
| 132 | shell.run( |
| 133 | ["sed", "-i", "-e", expr, f"{file}"], |
| 134 | check=True, |
| 135 | hide_output=hide_output, |
| 136 | ) |
| 137 | |
| 138 | |
| 139 | def fix_hermetic(targets: str = ".", hide_output: bool = False) -> None: |