// We use all the files published by the Node.js except some that are not needed const getPublishedFiles = async function(modulePath) { const ignore = getIgnoredFiles(modulePath) const publishedFiles = await pGlob(`${modulePath}/**`, { ignore, nodir: true, absolute: true, dot: true }) return publishedFiles }
// When using a directory, we include all its descendants except `node_modules` const getTreeFiles = function(srcPath, stat) { if (!stat.isDirectory()) { return [srcPath] } return pGlob(`${srcPath}/**`, { ignore: `${srcPath}/**/node_modules/**`, nodir: true, absolute: true }) }