Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const exit = function (ex) {
buntstift.line();
if (!ex) {
buntstift.exit(0);
return;
}
if (ex.message) {
buntstift.verbose(ex.message);
}
if (ex.stack) {
buntstift.verbose(ex.stack);
}
buntstift.exit(1);
const printTaskHeader = function (name) {
if (!name) {
throw new Error('Name is missing.');
}
buntstift.line();
buntstift.info(`Running ${name}...`, { prefix: '▸' });
};
const printTaskSuccess = function (message) {
if (!message) {
throw new Error('Message is missing.');
}
buntstift.line();
buntstift.success(message);
};
const line = function () {
buntstift.line();
};
const printTaskOmission = function (reason) {
if (!reason) {
throw new Error('Reason is missing.');
}
buntstift.line();
buntstift.warn(reason);
};