run transpilePackagesWithCustomTranspilerPaths on a thread

This commit is contained in:
Amin Yahyaabadi 2020-09-12 21:13:19 -05:00
parent 846b58336f
commit 94897624f2

View File

@ -11,7 +11,7 @@ const runApmInstall = require('./run-apm-install');
require('colors');
module.exports = function() {
function transpilePackagesWithCustomTranspilerPaths() {
console.log(
`Transpiling packages with custom transpiler configurations in ${
CONFIG.intermediateAppPath
@ -78,7 +78,7 @@ module.exports = function() {
intermediatePackageBackup.restore();
}
}
};
}
function transpilePath(path) {
fs.writeFileSync(
@ -86,3 +86,7 @@ function transpilePath(path) {
CompileCache.addPathToCache(path, CONFIG.atomHomeDirPath)
);
}
const { expose } = require(`${CONFIG.scriptRunnerModulesPath}/threads/worker`);
expose(transpilePackagesWithCustomTranspilerPaths);
module.exports = transpilePackagesWithCustomTranspilerPaths;