From ac85e2c333b2b5e59a3f3df34ed526b81b542cba Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 12 Feb 2025 21:41:00 -0600 Subject: [PATCH] [web] when building examples, delete the canvaskit bits from the output (#2586) We use the hosted artifacts, so this just wastes storage --- web/_tool/fix_base_tags.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/_tool/fix_base_tags.dart b/web/_tool/fix_base_tags.dart index 1dd2fc6126c..291ed587733 100644 --- a/web/_tool/fix_base_tags.dart +++ b/web/_tool/fix_base_tags.dart @@ -1,4 +1,5 @@ import 'dart:io'; + import 'package:path/path.dart' as p; Future main() async { @@ -47,6 +48,15 @@ Future fixBaseTags() async { ); 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); + } } } }