Browse Source

index: add quiet mode

master
Guillermo Rauch 9 years ago
parent
commit
0af1f69ed2
  1. 18
      lib/index.js

18
lib/index.js

@ -28,7 +28,7 @@ export default class Now extends EventEmitter {
this._onRetry = this._onRetry.bind(this);
}
async create (path, { forceNew, forceSync }) {
async create (path, { forceNew, forceSync, quiet = false }) {
this._path = path;
try {
@ -139,20 +139,22 @@ export default class Now extends EventEmitter {
});
if (sizeExceeded) {
console.log(`> \u001b[31mWarning!\u001b[39m ${sizeExceeded} of the files ` +
console.error(`> \u001b[31mWarning!\u001b[39m ${sizeExceeded} of the files ` +
'exceeded the limit for your plan.\n' +
`> See ${chalk.underline('https://zeit.co/account')} to upgrade.`);
}
}
if (engines && engines.node) {
if (missingVersion) {
console.log(`> Using Node.js ${chalk.bold(deployment.nodeVersion)} (default)`);
if (!quiet) {
if (engines && engines.node) {
if (missingVersion) {
console.log(`> Using Node.js ${chalk.bold(deployment.nodeVersion)} (default)`);
} else {
console.log(`> Using Node.js ${chalk.bold(deployment.nodeVersion)} (requested: ${chalk.dim(`\`${engines.node}\``)})`);
}
} else {
console.log(`> Using Node.js ${chalk.bold(deployment.nodeVersion)} (requested: ${chalk.dim(`\`${engines.node}\``)})`);
console.log(`> Using Node.js ${chalk.bold(deployment.nodeVersion)} (default)`);
}
} else {
console.log(`> Using Node.js ${chalk.bold(deployment.nodeVersion)} (default)`);
}
this._id = deployment.deploymentId;

Loading…
Cancel
Save