-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1030 from bertdeblock/remove-use-of-ember-cli-ui-…
…instance Remove use of ember-cli `ui` instance
- Loading branch information
Showing
13 changed files
with
120 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
const chalk = require('chalk'); | ||
|
||
let logFunction = originalLogFunction; | ||
|
||
function error(message) { | ||
logFunction(message, console.error, chalk.red); | ||
} | ||
|
||
function info(message) { | ||
logFunction(message, console.info, chalk.blue); | ||
} | ||
|
||
function log(message) { | ||
logFunction(message, console.log); | ||
} | ||
|
||
function prefix(string) { | ||
return chalk.inverse(` ${string} `); | ||
} | ||
|
||
function success(message) { | ||
logFunction(message, console.log, chalk.green); | ||
} | ||
|
||
function warn(message) { | ||
logFunction(message, console.warn, chalk.yellow); | ||
} | ||
|
||
function originalLogFunction(message, consoleLogFunction, chalkColorFunction) { | ||
consoleLogFunction(chalkColorFunction ? chalkColorFunction(message) : message); | ||
} | ||
|
||
function mockLog(mockedLogFunction) { | ||
logFunction = mockedLogFunction; | ||
} | ||
|
||
function restoreLog() { | ||
logFunction = originalLogFunction; | ||
} | ||
|
||
module.exports = { | ||
error, | ||
info, | ||
log, | ||
prefix, | ||
success, | ||
warn, | ||
|
||
_mockLog: mockLog, | ||
_restoreLog: restoreLog, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.