Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
filePath = filePath || process.cwd();
options = options || {};
options.config = options.config || getBrunchConfigPath(filePath, options);
logger.log(`Building project "${filePath}" …`);
try {
brunch.build(options, resolve);
} catch (err) {
logger.error(`Could not build project "${filePath}" …`);
throw err;
}
}).then(() => {
let builtPath = null;