Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: webpack_runner.js

Issue 29573821: Issue 5535 - Bundle paths should be relative in the files dict (Closed)
Patch Set: Created Oct. 11, 2017, 5:13 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld