Skip to content

Commit

Permalink
fix: use options sourceDir, and fix null property access. Also use 1.9
Browse files Browse the repository at this point in the history
proper tsconfig reading.

Fixes angular#619.
  • Loading branch information
hansl committed May 9, 2016
1 parent 668ecee commit ff66eca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/broccoli/angular2-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ class Angular2App extends BroccoliPlugin {
options = options || {};

this._options = options;
this._sourceDir = ngConfig.defaults.sourceDir || 'src';
this._sourceDir = options.sourceDir
|| (ngConfig.defaults && ngConfig.defaults.sourceDir)
|| 'src';
this._inputNode = inputNode || this._buildInputTree();
this._destDir = options.destDir || '';

Expand Down
4 changes: 1 addition & 3 deletions lib/broccoli/broccoli-typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ class BroccoliTypeScriptCompiler extends Plugin {

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

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

Expand Down

0 comments on commit ff66eca

Please sign in to comment.