28
29 revision = None
30 if not args.no_git_hash:
32 if revision is None:
33 revision = 'main'
34 output = '''dartdoc:
35 categoryOrder: ["Core", "VM", "Web", "Web (Legacy)"]
36 categories:
37 'Web':
38 external:
39 - name: 'package:web'
40 url: https://pub.dev/documentation/web/latest/
41 docs: >-
42 This package exposes browser APIs. It's intended to replace
43 dart:html and similar Dart SDK libraries. It will support access to
44 browser APIs from Dart code compiled to either JavaScript or
45 WebAssembly.
46 'Web (Legacy)':
47 external:
48 - name: 'package:js'
49 url: https://pub.dev/documentation/js/latest/
50 docs: >-
51 Use this package when you want to call JavaScript APIs from Dart
52 code, or vice versa.
53 linkToSource:
54 root: '.'
55 uriTemplate: 'https://github.com/dart-lang/sdk/blob/%s/sdk/%%f%%#L%%l%%'
56 errors:
57
58 - duplicate-file
59 - invalid-parameter
60 - no-defining-library-found
61 - tool-error
62 - unresolved-export
63
64 - ambiguous-doc-reference
65 - ambiguous-reexport
66 - broken-link
67 - category-order-gives-missing-package-name
68 - deprecated
69 - ignored-canonical-for
70 - missing-from-search-index
71 - no-canonical-found
72 - no-documentable-libraries
73 - no-library-level-docs
74 - not-implemented
75 - orphaned-file
76 - reexported-private-api-across-packages
77
78 - unknown-file
79 - unknown-macro
80 - unresolved-doc-reference
81 header:
82 - ../../../tools/bots/dartdoc_header.html
83 footer:
84 - ../../../tools/bots/dartdoc_footer.html
85 footerText:
86 - ../../../tools/bots/dartdoc_footer_text.html
87''' % revision
88 with open(args.output, 'w') as f:
89 f.write(output)
90 return 0
91
92
def GetGitRevision(git_revision_file=None, repo_path=DART_DIR)