Skip to content

DocC Rule #1420

@wendyliga

Description

@wendyliga

Will like to request to add a rule to generate apple's DocC documentation.
I would like to contribute it myself, but I am having a hard time translating it to starlark and bazel rule

but I would love to contribute on how to produce it

Emit symbol graph by passing to swift library

copts = [
   '-Xfrontend',
   '-emit-symbol-graph',
   '-emit-symbol-graph-dir',
   '/var/tmp/swift-symbol-graph/arm64-apple-ios-simulator'
]

Generate Docc

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/docc \
convert \
--index \
--fallback-display-name \
MySwiftLibrary \
--fallback-bundle-identifier \
com.example.MySwiftLibrary \
--fallback-bundle-version \
1 \
--output-dir \
/var/tmp/generated.doccarchive \
--additional-symbol-graph-dir \
/var/tmp/swift-symbol-graph

DocC is also open-sourced by apple, this is also possible to achieve by https://github.com/apple/swift-docc#using-docc-to-build-and-preview-documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions