Browse Source

feat: add ts-node-print alias

Kyle P Davis 5 years ago
parent
commit
9f24980f45
1 changed files with 1 additions and 0 deletions
  1. 1 0
      .profile

+ 1 - 0
.profile

@@ -88,6 +88,7 @@ alias d="l"
 alias tree="tree -CF"
 alias grep="grep --color --exclude-dir={.svn,.git,node_modules}"
 alias node-print="node -p -e 'const [,f=\".\",e=\"this\"]=process.argv; (function(){ with(this) return eval(e); }).call(require(path.resolve(f)))'"
+alias ts-node-print="TS_NODE_FILES=true node -r ts-node/register -p -e 'const [,f=\".\",e=\"this\"]=process.argv; (function(){ with(this) return eval(e); }).call(require(path.resolve(f)))'"
 
 # color diffs
 ! command -v colordiff &>/dev/null  ||  alias diff="colordiff"