MCPcopy Create free account
hub / github.com/webdriverio/webdriverio / runBuildScript

Function runBuildScript

infra/compiler/src/plugins.ts:173–192  ·  view source on GitHub ↗
(absWorkingDir: string, pkg: PackageJson)

Source from the content-addressed store, hash-verified

171}
172
173export function runBuildScript(absWorkingDir: string, pkg: PackageJson): Plugin {
174 return {
175 name: `build-${pkg.name || 'unknown'}`,
176 setup(build) {
177 build.onEnd(async () => {
178 const child = cp.spawn('pnpm',
179 ['run', 'build'],
180 { cwd: absWorkingDir, stdio: 'inherit' }
181 )
182 child.on('exit', (code) => {
183 if (code !== 0) {
184 console.log(`${l.name(pkg.name)} ❌ Failed run build script for ${pkg.name}`)
185 return
186 }
187 console.log(`${l.name(pkg.name)} ✅ Successfully ran build script for ${pkg.name}: "${pkg.scripts?.build}"`)
188 })
189 })
190 }
191 }
192}

Callers 1

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…