MCPcopy Index your code
hub / github.com/developit/microbundle / getBuildScript

Function getBuildScript

tools/build-fixture.js:31–41  ·  view source on GitHub ↗
(fixturePath, defaultScript)

Source from the content-addressed store, hash-verified

29})();
30
31export const getBuildScript = async (fixturePath, defaultScript) => {
32 let pkg = {};
33 try {
34 pkg = JSON.parse(
35 await readFile(resolve(fixturePath, 'package.json'), 'utf8'),
36 );
37 } catch (err) {
38 if (err.code !== 'ENOENT') throw err;
39 }
40 return (pkg && pkg.scripts && pkg.scripts.build) || defaultScript;
41};
42
43export const buildDirectory = async fixtureDir => {
44 let fixturePath = resolve(FIXTURES_DIR, fixtureDir);

Callers 2

index.test.jsFile · 0.90
buildDirectoryFunction · 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…