From 68e6e8be5a8909fcf0dc1aecdf42807d39bc8869 Mon Sep 17 00:00:00 2001 From: Eric Lindgren Date: Fri, 21 May 2021 16:55:23 -0400 Subject: [PATCH 1/2] Update README.md Adds explanation of new cliOptions config option --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index ea05184..493175f 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ It is possible to configure the require extension upon initialization: targetES5: true, exitOnError: true, emitOnError: true + cliOptions: ['--skipLibCheck'] }); ### nodeLib [boolean] default: false @@ -79,6 +80,10 @@ The directory underneath which output files should be placed Tells the TypeScript compiler whether or not to emit JS files if an error occurs. +### emitOnError [string[]] default: [] + +Will be appended to the tsc command line options. + # Module Dependencies in TS files You can load any other TypeScript or Javascript module from your typescripts. However, you should From a20823d87ea6fb9d98f51d08a8b5c5ba0acb419c Mon Sep 17 00:00:00 2001 From: Eric Lindgren Date: Fri, 21 May 2021 16:56:17 -0400 Subject: [PATCH 2/2] Update index.js --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 4228120..d1c239b 100644 --- a/index.js +++ b/index.js @@ -20,6 +20,7 @@ var options = { exitOnError: true, tmpDir: path.join(process.cwd(), "tmp"), lib: ["DOM", "ScriptHost", "ES5", "ES6", "ES7", "esnext"], + cliOptions: [], }; module.exports = function (opts) { @@ -79,6 +80,7 @@ function compileTS(module) { "--lib", Array.isArray(options.lib) ? options.lib.join(",") : options.lib, module.filename, + ...options.cliOptions, ]; var proc = merge(merge({}, process), {