-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(commands): support arrays in the middle of command arguments (#26)
fixes #20
- Loading branch information
Showing
12 changed files
with
1,583 additions
and
422 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,7 @@ | ||
# any variables set in here, you can override by creating a `.env` file. | ||
|
||
# by default logging is disabled - logs only happen when they match a regex | ||
# and the one here impossible to match: https://stackoverflow.com/a/2302992) | ||
LOG_REGEX=^\b$ | ||
WARN_REGEX=^\b$ | ||
ERROR_LOG_REGEX=^\b$ |
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 |
---|---|---|
|
@@ -48,3 +48,6 @@ todo.md | |
|
||
# local package testing | ||
handy-redis-0.0.0-development.tgz | ||
|
||
# local environment variable overrides | ||
.env |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,13 @@ | ||
import { load } from "dotenv-extended"; | ||
|
||
load(); | ||
|
||
const maybeLog = (logFn: Function, regex: string | undefined) => (...args: any[]) => { | ||
if (process.env.VERBOSE || regex === "" || args.join(" ").match(regex || ".*")) { | ||
logFn(...args); | ||
} | ||
}; | ||
// tslint:disable no-console | ||
export const warn = maybeLog(console.warn, process.env.WARN_REGEX); | ||
export const log = maybeLog(console.log, process.env.LOG_REGEX); | ||
export const error = maybeLog(console.error, process.env.ERROR_LOG_REGEX); |
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.