File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
test/general.shard/build_system/targets Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,12 @@ class Dart2JSTarget extends Dart2WebTarget {
252
252
return true ;
253
253
}
254
254
}
255
+
256
+ if (compilerConfig.dumpInfo) {
257
+ if (file.basename == 'main.dart.js.info.json' ) {
258
+ return true ;
259
+ }
260
+ }
255
261
return false ;
256
262
});
257
263
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class BuildWebCommand extends BuildSubCommand {
95
95
negatable: false ,
96
96
help:
97
97
'Passes "--dump-info" to the Javascript compiler which generates '
98
- 'information about the generated code is a . js.info.json file .' ,
98
+ 'information about the generated code in main.dart. js.info.json.' ,
99
99
);
100
100
argParser.addFlag (
101
101
'no-frequency-based-minification' ,
Original file line number Diff line number Diff line change @@ -227,14 +227,18 @@ name: foo
227
227
..createSync (recursive: true )
228
228
..writeAsStringSync ('A' );
229
229
environment.buildDir.childFile ('main.dart.js' ).createSync ();
230
+ environment.buildDir.childFile ('main.dart.js.info.json' ).createSync ();
230
231
environment.buildDir.childFile ('main.dart.js.map' ).createSync ();
231
232
environment.buildDir.childFile ('main.dart.js_1.part.js' ).createSync ();
232
233
environment.buildDir.childFile ('main.dart.js_1.part.js.map' ).createSync ();
233
234
234
- await WebReleaseBundle (< WebCompilerConfig > [const JsCompilerConfig ()]).build (environment);
235
+ await WebReleaseBundle (< WebCompilerConfig > [
236
+ const JsCompilerConfig (dumpInfo: true ),
237
+ ]).build (environment);
235
238
236
239
expect (environment.outputDir.childFile ('foo.txt' ).readAsStringSync (), 'A' );
237
240
expect (environment.outputDir.childFile ('main.dart.js' ).existsSync (), true );
241
+ expect (environment.outputDir.childFile ('main.dart.js.info.json' ).existsSync (), true );
238
242
expect (environment.outputDir.childFile ('main.dart.js.map' ).existsSync (), true );
239
243
expect (environment.outputDir.childFile ('main.dart.js_1.part.js' ).existsSync (), true );
240
244
expect (environment.outputDir.childFile ('main.dart.js_1.part.js.map' ).existsSync (), true );
You can’t perform that action at this time.
0 commit comments