MCPcopy
hub / github.com/webpack/webpack / setup

Function setup

setup/setup.js:13–31  ·  view source on GitHub ↗

* @returns {Promise<void>} result

()

Source from the content-addressed store, hash-verified

11 * @returns {Promise<void>} result
12 */
13function setup() {
14 return checkSymlinkExistsAsync()
15 .then(async (hasSymlink) => {
16 if (!hasSymlink) {
17 await ensureYarnInstalledAsync();
18 await runSetupSymlinkAsync();
19 if (!(await checkSymlinkExistsAsync())) {
20 throw new Error("windows symlink was not successfully created");
21 }
22 }
23 })
24 .then(() => {
25 process.exitCode = 0;
26 })
27 .catch((err) => {
28 console.error(err);
29 process.exitCode = 1;
30 });
31}
32
33/**
34 * @returns {Promise<void>} result

Callers 2

setup.jsFile · 0.70
_runGraphMethod · 0.50

Calls 4

checkSymlinkExistsAsyncFunction · 0.85
ensureYarnInstalledAsyncFunction · 0.85
runSetupSymlinkAsyncFunction · 0.85
errorMethod · 0.45

Tested by

no test coverage detected