Bug 1622996 - Make test case more explicit for build/build.js. r=jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D67540

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Laster 2020-03-19 19:46:49 +00:00
Родитель d3eaf3858d
Коммит a47cb013c7
1 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -65,23 +65,23 @@ function mkdirs(filePath) {
}
}
const deps = [__filename, _path.resolve(__dirname, "babel.js")];
const outputDir = process.argv[process.argv.length - 1];
mkdirs(outputDir);
for (let i = 2; i < process.argv.length - 1; i++) {
const srcPath = process.argv[i];
const code = transform(srcPath);
const fullPath = _path.join(outputDir, _path.basename(srcPath));
fs.writeFileSync(fullPath, code);
deps.push(srcPath);
}
if (false) {
const code = transform("devtools/client/debugger/src/utils/prefs.js");
console.log(code.slice(0, 1500));
}
} else {
const deps = [__filename, _path.resolve(__dirname, "babel.js")];
const outputDir = process.argv[process.argv.length - 1];
mkdirs(outputDir);
// Print all dependencies prefixed with 'dep:' in order to help node.py, the script that
// calls this module, to report back the precise list of all dependencies.
console.log(deps.map(file => "dep:" + file).join("\n"));
for (let i = 2; i < process.argv.length - 1; i++) {
const srcPath = process.argv[i];
const code = transform(srcPath);
const fullPath = _path.join(outputDir, _path.basename(srcPath));
fs.writeFileSync(fullPath, code);
deps.push(srcPath);
}
// Print all dependencies prefixed with 'dep:' in order to help node.py, the script that
// calls this module, to report back the precise list of all dependencies.
console.log(deps.map(file => "dep:" + file).join("\n"));
}