mirror of https://github.com/AMT-Cheif/drift.git
Use dartdoc package in docs website
This commit is contained in:
parent
779e2838c5
commit
93a34b6969
|
@ -14,9 +14,9 @@ builders:
|
|||
targets:
|
||||
prepare:
|
||||
builders:
|
||||
"|versions":
|
||||
":versions":
|
||||
enabled: true
|
||||
"|code_snippets":
|
||||
":code_snippets":
|
||||
enabled: true
|
||||
generate_for:
|
||||
- "lib/snippets/**/*.dart"
|
||||
|
@ -33,7 +33,7 @@ targets:
|
|||
$default:
|
||||
dependencies: [":prepare"]
|
||||
builders:
|
||||
build_web_compilers|entrypoint:
|
||||
build_web_compilers:entrypoint:
|
||||
release_options:
|
||||
# Turn of null assertions for release builds, it looks like this
|
||||
# makes generated code slightly smaller.
|
||||
|
|
|
@ -14,9 +14,9 @@ builders:
|
|||
targets:
|
||||
prepare:
|
||||
builders:
|
||||
"|versions":
|
||||
":versions":
|
||||
enabled: true
|
||||
"|code_snippets":
|
||||
":code_snippets":
|
||||
enabled: true
|
||||
generate_for:
|
||||
- "lib/snippets/**/*.dart"
|
||||
|
@ -36,7 +36,7 @@ targets:
|
|||
built_site:
|
||||
release_options:
|
||||
environment: "preview"
|
||||
build_web_compilers|entrypoint:
|
||||
build_web_compilers:entrypoint:
|
||||
release_options:
|
||||
# Turn of null assertions for release builds, it looks like this
|
||||
# makes generated code slightly smaller.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
# dartdoc has a weird config breaking everything, override!
|
|
@ -22,6 +22,8 @@ dev_dependencies:
|
|||
json_serializable: ^6.1.6
|
||||
shelf: ^1.2.0
|
||||
shelf_static: ^1.1.0
|
||||
# `dart doc` is missing some options, so we run `dart run dartdoc` instead.
|
||||
dartdoc: ^5.0.1
|
||||
code_snippets:
|
||||
hosted: https://simonbinder.eu
|
||||
version: ^0.0.4
|
||||
|
|
|
@ -82,14 +82,17 @@ Future<void> _createApiDocumentation(Directory output) async {
|
|||
// todo: Use `dart doc` after https://github.com/dart-lang/sdk/issues/46100#issuecomment-1033899215
|
||||
// gets clarified.
|
||||
final dartDoc = await Process.start(
|
||||
'dartdoc',
|
||||
'dart',
|
||||
[
|
||||
'run',
|
||||
'dartdoc',
|
||||
'--rel-canonical-prefix=https://pub.dev/documentation/drift/latest',
|
||||
'--link-to-source-revision=$rev',
|
||||
'--link-to-source-root=..',
|
||||
'--link-to-source-uri-template=$source',
|
||||
'--input=../drift',
|
||||
'--output=../drift/doc/api',
|
||||
],
|
||||
workingDirectory: '../drift',
|
||||
);
|
||||
await _waitForProcess(dartDoc, 'dartdoc');
|
||||
|
||||
|
|
Loading…
Reference in New Issue