From 9b4f3ffe31d9e92fbe3d3b34158fb6be0f03667d Mon Sep 17 00:00:00 2001 From: Maxim Procopenco Date: Fri, 13 Apr 2018 18:58:22 +0300 Subject: [PATCH] Add docs to readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 16e1e2c..3ba930c 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,20 @@ Then run with: `node -r ./tsconfig-paths-bootstrap.js main.js` +## Configuration Options + +You can set options by passing them before the script path, via programmatic usage or via environment variables. + +```bash +ts-node --project customLocation/tsconfig.json -r tsconfig-paths/register "test/**/*.ts" +``` + +### CLI and Programmatic Options + +_Environment variable denoted in parentheses._ + +* `-P, --project [path]` Path to TypeScript JSON project file (`TS_NODE_PROJECT`) + ## Config loading process 1. Use explicit params passed to register 2. Use `process.env.TS_NODE_PROJECT` to resolve tsConfig.json and the specified baseUrl and paths.