File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ module.exports = {
2424 }
2525
2626 try {
27- registry . add ( 'js' , new TsPreprocessor ( ) ) ;
27+ registry . add ( 'js' , new TsPreprocessor ( {
28+ ui : this . ui
29+ } ) ) ;
2830 } catch ( ex ) {
2931 this . ui . write (
3032 'Missing or invalid tsconfig.json, please fix or run `ember generate ember-cli-typescript`.'
Original file line number Diff line number Diff line change 22const fs = require ( 'fs' ) ;
33const path = require ( 'path' ) ;
44
5- const debug = require ( 'debug' ) ( 'ember-cli-typescript' ) ;
65const funnel = require ( 'broccoli-funnel' ) ;
76const mergeTrees = require ( 'broccoli-merge-trees' ) ;
8- const tsc = require ( 'broccoli-typescript-compiler' ) . typescript ;
7+ const TypeScriptPlugin = require ( 'broccoli-typescript-compiler' ) . TypeScriptPlugin ;
98
109const BroccoliDebug = require ( 'broccoli-debug' ) ;
1110
@@ -16,6 +15,7 @@ class TypeScriptPreprocessor {
1615 this . name = 'ember-cli-typescript' ;
1716 this . _tag = tag ++ ;
1817 this . ext = 'ts' ;
18+ this . ui = options . ui ;
1919
2020 // Update the config for how Broccoli handles the file system: no need for
2121 // includes, always emit, and let Broccoli manage any outDir.
@@ -42,13 +42,16 @@ class TypeScriptPreprocessor {
4242 `${ this . _tag } `
4343 ) ;
4444
45+ const tsc = new TypeScriptPlugin ( uncompiledTs , {
46+ throwOnError : this . config . compilerOptions . noEmitOnError ,
47+ annotation : 'Compiled TS files' ,
48+ include : [ '**/*' ] ,
49+ tsconfig : this . config ,
50+ } ) ;
51+ tsc . setDiagnosticWriter ( this . ui . writeWarnLine . bind ( this . ui ) ) ;
52+
4553 const ts = debugTree (
46- tsc ( uncompiledTs , {
47- throwOnError : this . config . compilerOptions . noEmitOnError ,
48- annotation : 'Compiled TS files' ,
49- include : [ '**/*' ] ,
50- tsconfig : this . config ,
51- } ) ,
54+ tsc ,
5255 `${ this . _tag } `
5356 ) ;
5457
You can’t perform that action at this time.
0 commit comments