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

Function getInput

src/index.js:204–224  ·  view source on GitHub ↗
({ entries, cwd, source, module })

Source from the content-addressed store, hash-verified

202}
203
204async function getInput({ entries, cwd, source, module }) {
205 const input = [];
206
207 []
208 .concat(
209 entries && entries.length
210 ? entries
211 : (source &&
212 (Array.isArray(source) ? source : [source]).map(file =>
213 resolve(cwd, file),
214 )) ||
215 ((await isDir(resolve(cwd, 'src'))) &&
216 (await jsOrTs(cwd, 'src/index'))) ||
217 (await jsOrTs(cwd, 'index')) ||
218 module,
219 )
220 .map(file => glob(file))
221 .forEach(file => input.push(...file));
222
223 return input;
224}
225
226async function getOutput({ cwd, output, pkgMain, pkgName }) {
227 let main = resolve(cwd, output || pkgMain || 'dist');

Callers 1

microbundleFunction · 0.85

Calls 2

isDirFunction · 0.90
jsOrTsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…