Skip to content

Commit

Permalink
Prettier newlines in terminal message
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Mar 8, 2017
1 parent 89651cc commit 343daa3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/listening.js
Expand Up @@ -45,22 +45,20 @@ module.exports = coroutine(function * (server, current, inUse) {

const localURL = `http://localhost:${details.port}`

message += `- ${chalk.bold('Local: ')} ${localURL}\n`
message += `- ${chalk.bold('Local: ')} ${localURL}`

try {
const ipAddress = ip.address()
const url = `http://${ipAddress}:${details.port}`

message += `- ${chalk.bold('On Your Network: ')} ${url}\n\n`
} catch (err) {
message += `\n`
}
message += `\n\n- ${chalk.bold('On Your Network: ')} ${url}`
} catch (err) {}

if (isTTY && process.platform === 'darwin') {
const copied = yield copyToClipboard(localURL)

if (copied) {
message += `${chalk.grey('Copied local address to clipboard!')}`
message += `\n\n${chalk.grey('Copied local address to clipboard!')}`
}
}

Expand Down

0 comments on commit 343daa3

Please sign in to comment.