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 = {
24
24
}
25
25
26
26
try {
27
- registry . add ( 'js' , new TsPreprocessor ( ) ) ;
27
+ registry . add ( 'js' , new TsPreprocessor ( {
28
+ ui : this . ui
29
+ } ) ) ;
28
30
} catch ( ex ) {
29
31
this . ui . write (
30
32
'Missing or invalid tsconfig.json, please fix or run `ember generate ember-cli-typescript`.'
Original file line number Diff line number Diff line change 2
2
const fs = require ( 'fs' ) ;
3
3
const path = require ( 'path' ) ;
4
4
5
- const debug = require ( 'debug' ) ( 'ember-cli-typescript' ) ;
6
5
const funnel = require ( 'broccoli-funnel' ) ;
7
6
const mergeTrees = require ( 'broccoli-merge-trees' ) ;
8
- const tsc = require ( 'broccoli-typescript-compiler' ) . typescript ;
7
+ const TypeScriptPlugin = require ( 'broccoli-typescript-compiler' ) . TypeScriptPlugin ;
9
8
10
9
const BroccoliDebug = require ( 'broccoli-debug' ) ;
11
10
@@ -16,6 +15,7 @@ class TypeScriptPreprocessor {
16
15
this . name = 'ember-cli-typescript' ;
17
16
this . _tag = tag ++ ;
18
17
this . ext = 'ts' ;
18
+ this . ui = options . ui ;
19
19
20
20
// Update the config for how Broccoli handles the file system: no need for
21
21
// includes, always emit, and let Broccoli manage any outDir.
@@ -42,13 +42,16 @@ class TypeScriptPreprocessor {
42
42
`${ this . _tag } `
43
43
) ;
44
44
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
+
45
53
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 ,
52
55
`${ this . _tag } `
53
56
) ;
54
57
You can’t perform that action at this time.
0 commit comments