Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const matchBuilder = (dest, build) => {
if (build.src === 'package.json' && build.config && build.config.distDir) {
const distPath = path.normalize([build.config.distDir, dest].join('/'))
const exist = fs.existsSync(distPath)
if (exist) {
return exist
}
}
return extglob.isMatch(dest, '?(/)' + build.src)
}
const getBuilder = dest => nowConf.builds.find(build => matchBuilder(dest, build));