Clean up examples, remove section markers and --template args (#91133)
This does a cleanup of the examples, removing all of the "section" markers and extra comments that we don't need anymore now that the samples are no longer in the source code. It also removes the --template arguments from the {@tool dartpad} and {@tool sample} directives, since those are no longer used. It converts two examples that I discovered were still embedded into linked examples in the examples folder.
I didn't delete the templates from the snippets config folder yet, because there are still embedded samples in the dart:ui package from the engine that use them. Once dart:ui no longer uses the templates, they can be removed.
I bumped the version of the snippets package to pick up a change that allows removal of the --template argument.
This commit is contained in:
@@ -19,7 +19,7 @@ import 'package:path/path.dart' as path;
|
||||
import 'package:watcher/watcher.dart';
|
||||
|
||||
// If you update this version, also update it in dev/bots/docs.sh
|
||||
const String _snippetsActivateVersion = '0.2.3';
|
||||
const String _snippetsActivateVersion = '0.2.5';
|
||||
|
||||
final String _flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script))));
|
||||
final String _defaultFlutterPackage = path.join(_flutterRoot, 'packages', 'flutter', 'lib');
|
||||
|
||||
@@ -26,7 +26,7 @@ function generate_docs() {
|
||||
# assets-for-api-docs repo:
|
||||
# https://github.com/flutter/assets-for-api-docs/tree/master/packages/snippets
|
||||
# >>> If you update this version, also update it in dev/bots/analyze_sample_code.dart <<<
|
||||
"$DART" pub global activate snippets 0.2.3
|
||||
"$DART" pub global activate snippets 0.2.5
|
||||
|
||||
# This script generates a unified doc set, and creates
|
||||
# a custom index.html, placing everything into dev/docs/doc.
|
||||
|
||||
Reference in New Issue
Block a user