Skip to content

Commit 0101e89

Browse files
committed
Default undefined compiler options to the default values from the meteor-typescript NPM.
1 parent 36bf621 commit 0101e89

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'barbatus:typescript-compiler',
3-
version: '0.5.0-beta.13',
3+
version: '0.5.0-beta.14',
44
summary: 'TypeScript Compiler for Meteor',
55
git: 'https://github.com/barbatus/ts-compilers',
66
documentation: 'README.md'

typescript.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ TypeScript = {
2020
getDefaultOptions: meteorTS.getDefaultOptions,
2121

2222
getCompilerOptions(compilerOptions, extraOptions) {
23-
let resultOptions = compilerOptions ? _.clone(compilerOptions) :
24-
meteorTS.getDefaultOptions().compilerOptions;
23+
let dco = meteorTS.getDefaultOptions().compilerOptions;
24+
let resultOptions = compilerOptions ? _.clone(compilerOptions) : dco;
2525

26-
// If diagnostics no defined, set it to true.
27-
_.defaults(resultOptions, {
28-
module: 'commonjs',
29-
diagnostics: true
30-
});
26+
// First, default undefined values, e.g.,
27+
// if diagnostics undefined, set it to true, etc.
28+
_.defaults(resultOptions, dco);
3129

30+
// Second, apply extra options, i.e.,
31+
// options passed in the compiler constructor.
3232
_.extend(resultOptions, extraOptions);
3333

3434
return resultOptions;

0 commit comments

Comments
 (0)