[Tool] [Code Excerpt] allow excerpts in example readme (#3758)

Adds the ability to add code excerpts to README files within the example directory.
This commit is contained in:
Tarrin Neal
2023-04-19 14:31:11 -07:00
committed by GitHub
parent 8d3bf84a42
commit 84ebba2979
4 changed files with 81 additions and 1 deletions

View File

@ -89,6 +89,10 @@ class UpdateExcerptsCommand extends PackageLoopingCommand {
if (!await _injectSnippets(example, targetPackage: package)) {
return PackageResult.fail(<String>['Unable to inject excerpts']);
}
if (!await _injectSnippets(example, targetPackage: example)) {
return PackageResult.fail(
<String>['Unable to inject example excerpts']);
}
} finally {
// Clean up the pubspec changes and extracted excerpts directory.
_undoPubspecChanges(example);