MCPcopy Index your code
hub / github.com/bitjson/typescript-starter / install

Function install

src/cli/tasks.ts:130–147  ·  view source on GitHub ↗
(spawner: typeof execa)

Source from the content-addressed store, hash-verified

128};
129
130export const install = (spawner: typeof execa) => async (
131 runner: Runner,
132 projectDir: string
133) => {
134 const opts: Options = {
135 cwd: projectDir,
136 encoding: 'utf8',
137 stdio: 'inherit',
138 };
139 try {
140 runner === Runner.Npm
141 ? spawner('npm', ['install'], opts)
142 : spawner('yarn', opts);
143 } catch (err) {
144 // eslint-disable-next-line functional/no-throw-statement
145 throw new Error(`Installation failed. You'll need to install manually.`);
146 }
147};
148
149/**
150 * Returns the URL and branch to clone. We clone the branch (tag) at the current

Callers 2

cli.unit.spec.tsFile · 0.90
tasks.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected