Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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), {
Expand Down