(path)
| 112 | } |
| 113 | } |
| 114 | parseManifest(path) { |
| 115 | const buffer = this.readFileString(path); |
| 116 | try { |
| 117 | return JSON.parse(buffer); |
| 118 | } |
| 119 | catch (e) { |
| 120 | const message = e.toString(); |
| 121 | const result = /SyntaxError: ([^:]+: )?([0-9]+): (.+)/.exec(message); |
| 122 | if (result.length == 4) { |
| 123 | this.reportError(path, parseInt(result[2]), result[3]); |
| 124 | } |
| 125 | throw new Error("'" + path + "': invalid manifest!");; |
| 126 | } |
| 127 | } |
| 128 | resolveSlash(value) { |
| 129 | if (this.windows) |
| 130 | value = value.replace(/\//g, "\\"); |