| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 } | 130 } |
| 131 else if (stats.hasErrors()) | 131 else if (stats.hasErrors()) |
| 132 throw new Error(stats.toJson().errors.join("\n")); | 132 throw new Error(stats.toJson().errors.join("\n")); |
| 133 else | 133 else |
| 134 { | 134 { |
| 135 let files = {}; | 135 let files = {}; |
| 136 | 136 |
| 137 for (let config of options) | 137 for (let config of options) |
| 138 { | 138 { |
| 139 let filepath = path.join(config.output.path, config.output.filename); | 139 let filepath = path.join(config.output.path, config.output.filename); |
| 140 let mappath = filepath + ".map"; | 140 let relativeFilepath = path.relative("/", filepath); |
| 141 files[filepath] = memoryFS.readFileSync(filepath, "utf-8"); | 141 files[relativeFilepath] = memoryFS.readFileSync(filepath, "utf-8"); |
| 142 files[mappath] = memoryFS.readFileSync(mappath, "utf-8"); | 142 files[relativeFilepath + ".map"] = memoryFS.readFileSync( |
| 143 filepath + ".map", "utf-8" |
| 144 ); |
| 143 } | 145 } |
| 144 | 146 |
| 145 console.log(JSON.stringify(files)); | 147 console.log(JSON.stringify(files)); |
| 146 } | 148 } |
| 147 }); | 149 }); |
| 148 }); | 150 }); |
| OLD | NEW |