Lint scripts dir
This commit is contained in:
@@ -14,13 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const url = require('url');
|
||||
const fsProm = require('fs').promises;
|
||||
const child_process = require('child_process');
|
||||
|
||||
async function build(hakEnv, moduleInfo) {
|
||||
moduleInfo.scripts.build(hakEnv, moduleInfo);
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = build;
|
||||
|
||||
@@ -62,6 +62,6 @@ async function copy(hakEnv, moduleInfo) {
|
||||
await fsProm.copyFile(src, dst);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = copy;
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
const path = require('path');
|
||||
const url = require('url');
|
||||
const fsProm = require('fs').promises;
|
||||
const child_process = require('child_process');
|
||||
const childProcess = require('child_process');
|
||||
|
||||
const npm = require('npm');
|
||||
const semver = require('semver');
|
||||
@@ -91,7 +91,7 @@ async function fetch(hakEnv, moduleInfo) {
|
||||
|
||||
console.log("Running yarn install in " + moduleInfo.moduleBuildDir);
|
||||
await new Promise((resolve, reject) => {
|
||||
const proc = child_process.spawn(
|
||||
const proc = childProcess.spawn(
|
||||
hakEnv.isWin() ? 'yarn.cmd' : 'yarn',
|
||||
['install', '--ignore-scripts'],
|
||||
{
|
||||
|
||||
@@ -21,6 +21,6 @@ async function fetchDeps(hakEnv, moduleInfo) {
|
||||
if (moduleInfo.scripts.fetchDeps) {
|
||||
await moduleInfo.scripts.fetchDeps(hakEnv, moduleInfo);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = fetchDeps;
|
||||
|
||||
@@ -15,7 +15,6 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const fsProm = require('fs').promises;
|
||||
|
||||
const findNpmPrefix = require('find-npm-prefix');
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
const fsProm = require('fs').promises;
|
||||
const child_process = require('child_process');
|
||||
const childProcess = require('child_process');
|
||||
|
||||
async function link(hakEnv, moduleInfo) {
|
||||
const yarnrc = path.join(hakEnv.projectRoot, '.yarnrc');
|
||||
@@ -31,7 +31,7 @@ async function link(hakEnv, moduleInfo) {
|
||||
await fsProm.stat(yarnrc);
|
||||
} catch (e) {
|
||||
await fsProm.writeFile(
|
||||
yarnrc,
|
||||
yarnrc,
|
||||
// XXX: 1. This must be absolute, as yarn will resolve link directories
|
||||
// relative to the closest project root, which means when we run it
|
||||
// in the dependency project, it will put the link directory in its
|
||||
@@ -47,7 +47,7 @@ async function link(hakEnv, moduleInfo) {
|
||||
const yarnCmd = 'yarn' + (hakEnv.isWin() ? '.cmd' : '');
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
const proc = child_process.spawn(yarnCmd, ['link'], {
|
||||
const proc = childProcess.spawn(yarnCmd, ['link'], {
|
||||
cwd: moduleInfo.moduleOutDir,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
@@ -57,7 +57,7 @@ async function link(hakEnv, moduleInfo) {
|
||||
});
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
const proc = child_process.spawn(yarnCmd, ['link', moduleInfo.name], {
|
||||
const proc = childProcess.spawn(yarnCmd, ['link', moduleInfo.name], {
|
||||
cwd: hakEnv.projectRoot,
|
||||
stdio: 'inherit',
|
||||
});
|
||||
@@ -65,6 +65,6 @@ async function link(hakEnv, moduleInfo) {
|
||||
code ? reject(code) : resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = link;
|
||||
|
||||
Reference in New Issue
Block a user