| 1777 | } |
| 1778 | |
| 1779 | export class PrerequisiteFile { |
| 1780 | constructor(path, tool) { |
| 1781 | this.path = path; |
| 1782 | this.tool = tool; |
| 1783 | this.former = tool.isDirectoryOrFile(path) ? tool.readFileString(path) : ""; |
| 1784 | this.current = "" |
| 1785 | } |
| 1786 | close() { |
| 1787 | if (this.former.localeCompare(this.current)) |
| 1788 | this.tool.writeFileString(this.path, this.current); |
| 1789 | } |
| 1790 | line(...strings) { |
| 1791 | for (var string of strings) |
| 1792 | this.write(string); |
| 1793 | this.write("\n"); |
| 1794 | } |
| 1795 | write(string) { |
| 1796 | this.current += string; |
| 1797 | } |
| 1798 | } |
| 1799 | |
| 1800 | export class TSConfigFile extends PrerequisiteFile { |
| 1801 | generate(tool, typescript = true, javascript = false) { |
nothing calls this directly
no outgoing calls
no test coverage detected