@@ -5,6 +5,7 @@ var move = RSVP.denodeify(fse.move);
55var CoreObject = require ( 'core-object' ) ;
66var engines = require ( './engines' ) ;
77var FileInfoCollection = require ( './models/file-info-collection' ) ;
8+ var Logger = require ( './models/logger' ) ;
89
910var Engine = CoreObject . extend ( {
1011 init : function ( ) {
@@ -26,13 +27,21 @@ var Engine = CoreObject.extend({
2627
2728 this . _promise = null ;
2829 this . _fileInfoCollection = new FileInfoCollection ( ) ;
30+ this . _logger = new Logger ( {
31+ projectRoot : this . projectRoot
32+ } ) ;
2933 this . _fileInfos = [ ] ;
3034 } ,
3135
3236 _queueMoveFile : function ( source , dest ) {
37+ var logger = this . _logger ;
38+
3339 this . _promise = this . _promise
3440 . then ( function ( ) {
3541 return move ( source , dest ) ;
42+ } )
43+ . then ( function ( ) {
44+ logger . movedFile ( source , dest ) ;
3645 } ) ;
3746 } ,
3847
@@ -90,6 +99,8 @@ var Engine = CoreObject.extend({
9099 this . _filesInDir ( 'tests' )
91100 ) ;
92101
102+ var verbose = this . verbose ;
103+ var logger = this . _logger ;
93104 var projectRoot = this . projectRoot ;
94105 var i ;
95106
@@ -116,7 +127,13 @@ var Engine = CoreObject.extend({
116127 this . _queueRemoveEmptyDirs ( 'app' ) ;
117128 this . _queueRemoveEmptyDirs ( 'tests' ) ;
118129
119- return this . _promise ;
130+ return this . _promise
131+ . then ( function ( ) {
132+ /*eslint no-console: 0 */
133+ if ( verbose ) {
134+ console . log ( logger . flush ( ) ) ;
135+ }
136+ } ) ;
120137 } ,
121138
122139 fileInfoFor : function ( path ) {
0 commit comments