Skip to content

Commit 7ba388d

Browse files
committed
fix: use options sourceDir, and fix null property access. Also use 1.9
proper tsconfig reading. Fixes #619.
1 parent 7396287 commit 7ba388d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/broccoli/angular2-app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ class Angular2App extends BroccoliPlugin {
2727
options = options || {};
2828

2929
this._options = options;
30-
this._sourceDir = ngConfig.defaults.sourceDir || 'src';
30+
this._sourceDir = options.sourceDir
31+
|| (ngConfig.defaults && ngConfig.defaults.sourceDir)
32+
|| 'src';
3133
this._inputNode = inputNode || this._buildInputTree();
3234
this._destDir = options.destDir || '';
3335

lib/broccoli/broccoli-typescript.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ class BroccoliTypeScriptCompiler extends Plugin {
159159

160160
this._tsConfigFiles = tsconfig.files.splice(0);
161161

162-
// the conversion is a bit awkward, see https://github.com/Microsoft/TypeScript/issues/5276
163-
// in 1.8 use convertCompilerOptionsFromJson
164-
this._tsOpts = ts.parseJsonConfigFileContent(tsconfig, null, null).options;
162+
this._tsOpts = ts.convertCompilerOptionsFromJson(tsconfig, '', null).options;
165163
this._tsOpts.rootDir = '';
166164
this._tsOpts.outDir = '';
167165

0 commit comments

Comments
 (0)