chore: generalize node6 transpilation (#1560)

This patch unifies node6 transpilation:
- instead of generating multiple top-level directories, prefixed with
  `node6-`, all transpiled code gets placed under single `node6/` folder
- transpilation doesn't change require paths of transpiled modules any
  more
This commit is contained in:
Andrey Lushnikov
2017-12-08 15:14:28 -08:00
committed by GitHub
parent 9a5086847c
commit 391d1abaa7
7 changed files with 46 additions and 26 deletions

View File

@@ -34,7 +34,8 @@ const downloadURLs = {
win64: '%s/chromium-browser-snapshots/Win_x64/%d/chrome-win32.zip',
};
const PROJECT_ROOT = path.join(__dirname, '..');
// Project root will be different for node6-transpiled code.
const PROJECT_ROOT = fs.existsSync(path.join(__dirname, '..', 'package.json')) ? path.join(__dirname, '..') : path.join(__dirname, '..', '..');
class Downloader {
/**