File tree Expand file tree Collapse file tree 2 files changed +4
-174
lines changed
Expand file tree Collapse file tree 2 files changed +4
-174
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,15 @@ function karmaCreateConfig(reporters, configFileName) {
144144 }
145145 var filePath = path . resolve ( configFileName ) ;
146146 if ( fs . existsSync ( filePath ) ) {
147+ // Can safely ignore JsHint warnign here because through2 sets the value of
148+ // `this` to the file stream
149+ var stream = this ; // jshint ignore:line
147150 var contents = fs . readFileSync ( filePath ) . toString ( )
148151 . replace ( basePathRegex , encode ( process . cwd ( ) ) )
149152 . replace ( filesAppendRegex , encode ( files . concat ( additional ) ) )
150153 . replace ( reportersAppendRegex , encode ( reporters . map ( getKarmaReporterName ) ) )
151154 . replace ( pluginsAppendRegex , '[\n' + reporters . map ( requirePlugins ) . join ( ',\n' ) + '\n]' ) ;
152- this . push ( new gutil . File ( {
155+ stream . push ( new gutil . File ( {
153156 path : filePath ,
154157 contents : new Buffer ( contents )
155158 } ) ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments