This repository has been archived by the owner on Oct 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
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 #62 from pawelgalazka/v4.1
v4.1
- Loading branch information
Showing
15 changed files
with
1,621 additions
and
1,048 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ignore] | ||
|
||
[include] | ||
|
||
[libs] | ||
|
||
[lints] | ||
|
||
[options] | ||
module.ignore_non_literal_requires=true |
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ node_modules | |
*.swp | ||
.DS_Store | ||
npm-debug.log | ||
/coverage | ||
/lib |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.travis.yml | ||
node_modules | ||
/test | ||
/src |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,32 +1,33 @@ | ||
// @flow | ||
const chalk = require('chalk') | ||
|
||
// Needed to use ES5 inheritance, because of issues with Error subclassing for Babel | ||
function RunJSError (message) { | ||
function RunJSError (message: string) { | ||
this.name = 'RunJSError' | ||
this.message = message && message.split('\n')[0] // assign only first line | ||
} | ||
RunJSError.prototype = Object.create(Error.prototype) | ||
RunJSError.prototype.constructor = RunJSError | ||
|
||
const logger = { | ||
debug: (...args) => { | ||
console.log(chalk.blue(...args)) | ||
}, | ||
info: (...args) => { | ||
class Logger { | ||
title (...args: Array<any>) { | ||
console.log(chalk.bold(...args)) | ||
}, | ||
log: (...args) => { | ||
} | ||
log (...args: Array<any>) { | ||
console.log(...args) | ||
}, | ||
warning: (...args) => { | ||
} | ||
warning (...args: Array<any>) { | ||
console.warn(chalk.yellow(...args)) | ||
}, | ||
error: (...args) => { | ||
} | ||
error (...args: Array<any>) { | ||
console.error(chalk.red(...args)) | ||
} | ||
} | ||
|
||
const logger = new Logger() | ||
|
||
module.exports = { | ||
RunJSError, | ||
logger | ||
logger, | ||
Logger | ||
} |
Oops, something went wrong.