Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
// Report and show execution time
const hrtime = process.hrtime(start);
report.executionTime(hrtime);
log.info(`Bundling took ${pretty(hrtime)}`);
// Send report analytics data
report.sendAnalytics();
// Write report if requested
if (project.misc.reportFile) {
fs.writeFileSync(
project.misc.reportFile.asNative,
report.toHtml()
);
log.info(
`Report written to ${project.misc.reportFile.asNative}`
);
} else if (report.warningsPresent) {
log.debug('The build has emitted some warning messages.');
}
})
.catch(abort);
globs.push(...gl.negate(project.transform.babelIgnores));
}
// Run babel through files
const prjRelPaths = findFiles(
project.dir.asNative,
gl.prefix(`${project.dir.asPosix}/${destPkg.dir.asPosix}/`, globs)
);
log.debug(
`Babelifying ${prjRelPaths.length} files in package '${destPkg.id}'...`
);
return runInChunks(
prjRelPaths,
project.misc.maxParallelFiles,
0,
prjRelPath => babelifyFile(destPkg, prjRelPath, babelConfig)
);
}
.then(() => {
// Report and show execution time
const hrtime = process.hrtime(start);
report.executionTime(hrtime);
log.info(`Bundling took ${pretty(hrtime)}`);
// Send report analytics data
report.sendAnalytics();
// Write report if requested
if (project.misc.reportFile) {
fs.writeFileSync(
project.misc.reportFile.asNative,
report.toHtml()
);
log.info(
`Report written to ${project.misc.reportFile.asNative}`
);
} else if (report.warningsPresent) {
log.debug('The build has emitted some warning messages.');
}
})
.catch(abort);
export default function(argv: {version: boolean}): void {
const versionsInfo = project.versionsInfo;
if (argv.version) {
versionsInfo.forEach((value, key) => {
console.log(`"${key}":`, JSON.stringify(value, null, 2));
});
return;
}
report.versionsInfo(versionsInfo);
if (project.misc.noTracking) {
run();
} else {
log.debug(
'The tool is sending usage statistics to our remote servers.'
);
insight.init().then(run);
}
}
export function debug(...args) {
if (project.misc.verbose) {
console.log(...args);
}
}
: ['**/*'];
const globs = [...sourceGlobs, '!node_modules/**/*'];
const sourcePrjRelPaths = findFiles(
project.dir.asNative,
gl.prefix(`${project.dir.asPosix}/${srcPkg.dir.asPosix}/`, globs)
);
const destPkg = srcPkg.clone({
dir: getDestDir(srcPkg),
});
return runInChunks(
sourcePrjRelPaths,
project.misc.maxParallelFiles,
0,
prjRelPath => processFile(srcPkg, destPkg, prjRelPath)
);
}