Skip to content

Commit

Permalink
Generate api.md from sources
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed May 18, 2021
1 parent c674b9d commit 6f443ca
Show file tree
Hide file tree
Showing 4 changed files with 377 additions and 709 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_bazel_stardoc",
patches = [],
patches = ["//doc:stardoc.pr103.patch"],
sha256 = "f89bda7b6b696c777b5cf0ba66c80d5aa97a6701977d43789a9aee319eef71e8",
strip_prefix = "stardoc-d93ee5347e2d9c225ad315094507e018364d5a67",
urls = [
Expand Down
16 changes: 16 additions & 0 deletions doc/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")

_DOC_SRCS = {
"api": [
"swift_common",
],
"aspects": [
"swift_usage_aspect",
],
Expand All @@ -24,6 +27,19 @@ _DOC_SRCS = {
],
}

write_file(
name = "api_header",
out = "api_header.vm",
content = [
"<!-- Generated with Stardoc, Do Not Edit! -->",
"# Build API",
"",
"The `swift_common` module provides API access to the behavior implemented",
"by the Swift build rules, so that other custom rules can invoke Swift",
"compilation and/or linking as part of their implementation.",
],
)

write_file(
name = "aspects_header",
out = "aspects_header.vm",
Expand Down
Loading

0 comments on commit 6f443ca

Please sign in to comment.