@@ -15,7 +15,6 @@ import { CliConfig } from '../models/config';
15
15
import 'rxjs/add/operator/concatMap' ;
16
16
import 'rxjs/add/operator/map' ;
17
17
import { getCollection , getSchematic } from '../utilities/schematics' ;
18
- import { getAppFromConfig } from '../utilities/app-utils' ;
19
18
20
19
21
20
const Task = require ( '../ember-cli/lib/models/task' ) ;
@@ -53,13 +52,6 @@ export default Task.extend({
53
52
const collection = getCollection ( collectionName ) ;
54
53
const schematic = getSchematic ( collection , schematicName ) ;
55
54
56
- let modifiedFiles : string [ ] = [ ] ;
57
-
58
- let appConfig ;
59
- try {
60
- appConfig = getAppFromConfig ( taskOptions . app ) ;
61
- } catch ( err ) { }
62
-
63
55
const projectRoot = ! ! this . project ? this . project . root : workingDir ;
64
56
65
57
const preppedOptions = prepOptions ( schematic , taskOptions ) ;
@@ -73,6 +65,7 @@ export default Task.extend({
73
65
74
66
let error = false ;
75
67
const loggingQueue : OutputLogging [ ] = [ ] ;
68
+ const modifiedFiles : string [ ] = [ ] ;
76
69
77
70
dryRunSink . reporter . subscribe ( ( event : DryRunEvent ) => {
78
71
const eventPath = event . path . startsWith ( '/' ) ? event . path . substr ( 1 ) : event . path ;
@@ -88,15 +81,15 @@ export default Task.extend({
88
81
keyword : 'update' ,
89
82
message : `${ eventPath } (${ event . content . length } bytes)`
90
83
} ) ;
91
- modifiedFiles = [ ... modifiedFiles , event . path ] ;
84
+ modifiedFiles . push ( event . path ) ;
92
85
break ;
93
86
case 'create' :
94
87
loggingQueue . push ( {
95
88
color : green ,
96
89
keyword : 'create' ,
97
90
message : `${ eventPath } (${ event . content . length } bytes)`
98
91
} ) ;
99
- modifiedFiles = [ ... modifiedFiles , event . path ] ;
92
+ modifiedFiles . push ( event . path ) ;
100
93
break ;
101
94
case 'delete' :
102
95
loggingQueue . push ( {
@@ -112,6 +105,7 @@ export default Task.extend({
112
105
keyword : 'rename' ,
113
106
message : `${ eventPath } => ${ eventToPath } `
114
107
} ) ;
108
+ modifiedFiles . push ( event . to ) ;
115
109
break ;
116
110
}
117
111
} ) ;
0 commit comments