1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

[web] when building examples, delete the canvaskit bits from the output (#2586)

We use the hosted artifacts, so this just wastes storage
This commit is contained in:
Kevin Moore
2025-02-12 21:41:00 -06:00
committed by GitHub
parent 04aea26b6a
commit ac85e2c333

View File

@@ -1,4 +1,5 @@
import 'dart:io'; import 'dart:io';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
Future<void> main() async { Future<void> main() async {
@@ -47,6 +48,15 @@ Future<void> fixBaseTags() async {
); );
await index.writeAsString(newContents); await index.writeAsString(newContents);
} }
// Since all of the web examples use the hosted canvaskit bits
// There is no need to deploy these
final canvasKitDirectory = Directory(
p.join(builtSample.path, 'canvaskit'),
);
if (canvasKitDirectory.existsSync()) {
canvasKitDirectory.deleteSync(recursive: true);
}
} }
} }
} }