Skip to content

Commit

Permalink
Migrate to DocC for API reference docs (#257)
Browse files Browse the repository at this point in the history
We currently use Swift Doc to generate the API reference documentation
site, which was deprecated after Apple announced their fancy
documentation generator at WWDC 2021 called DocC. In addition to
producing great looking content pages, DocC supports arbitrary markdown
formatted articles, interactive tutorials, and works well with SwiftPM
packages.

DocC’s feature set makes it easy to consolidate our existing
documentation, which is scattered across the README, GitHub wiki, and
API reference site. There are several benefits as well, including
searchability (Google doesn’t index GitHub wiki pages) and the ability
to decouple the README contents from releases.
  • Loading branch information
andrewchang-bird authored Jan 7, 2022
1 parent f498ab3 commit b491852
Show file tree
Hide file tree
Showing 480 changed files with 7,000 additions and 54,837 deletions.
27 changes: 27 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contributing to Mockingbird

## Getting Started

Welcome! We’re excited to have you as part of the Mockingbird developer community.

- [Join the #mockingbird Slack channel](https://join.slack.com/t/birdopensource/shared_invite/zt-wogxij50-3ZM7F8ZxFXvPkE0j8xTtmw)
- [Check out the GitHub tasks board](https://github.com/birdrides/mockingbird/projects/2)
- [Search for good first issues](https://github.com/birdrides/mockingbird/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)

## Issues and Bugs

Before opening an issue, please search the [existing GitHub issues](https://github.com/birdrides/mockingbird/issues) and list of [common problems](https://mockingbirdswift.com/common-problems). Use one of the provided issue templates so that others have sufficient context to fix the issue.

## Feature Requests

Submit feature requests as a [GitHub issue](https://github.com/birdrides/mockingbird/issues/new/choose), using the provided “Feature Request” template.

## Pull Requests

Use the provided “Pull Request” template when submitting pull requests. If making a change to codegen or the testing runtime, make sure to update the end-to-end and/or framework tests.

All pull requests are squash-merged into `master`. For large or complex changes, consider creating a stacked pull request and joining the [#mockingbird Slack channel](https://join.slack.com/t/birdopensource/shared_invite/zt-wogxij50-3ZM7F8ZxFXvPkE0j8xTtmw) to facilitate discussion.

## Coding Guidelines

Mockingbird loosely follows [Google’s Swift style guide](https://google.github.io/swift/). When in doubt, prefer consistency with existing conventions in the code.
47 changes: 0 additions & 47 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature Request
about: Submit a new feature request
title: ''
labels: 'enhancement'
assignees: ''

---

## New Feature Request Checklist

- [ ] I searched the [existing GitHub feature requests](https://github.com/birdrides/mockingbird/labels/enhancement)

## Overview

The expected behavior and use case.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/framework-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Framework Issue
about: Report a problem with the testing framework
title: ''
labels: 'framework bug'
assignees: ''

---

## New Issue Checklist

- [ ] I updated the framework and generator to the latest version
- [ ] I searched the [existing GitHub issues](https://github.com/birdrides/mockingbird/issues) and list of [common problems](https://mockingbirdswift.com/common-problems)

## Overview

A summary of the issue.

## Example

A minimal example of the code being tested along with the test case.

## Expected Behavior

If needed, provide a short description of how it should work.

## Environment

* Mockingbird CLI version (`mockingbird version`)
* Xcode and Swift version (`swift --version`)
* Package manager (CocoaPods, Carthage, SPM project, SPM package)
* Unit testing framework (XCTest, Quick/Nimble)
* Custom configuration
- [ ] Mockingbird ignore files
- [ ] Supporting source files
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/generator-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Generator Issue
about: Report a problem with the code generator
title: ''
labels: 'generator bug'
assignees: ''

---

## New Issue Checklist

- [ ] I updated the framework and generator to the latest version
- [ ] I searched the [existing GitHub issues](https://github.com/birdrides/mockingbird/issues) and list of [common problems](https://mockingbirdswift.com/common-problems)

## Overview

A summary of the issue.

## Example

If the generator produces code that is malformed or does not compile, please provide:

1. A minimal example of the original source
2. The actual mocking code generated

If the generator is not producing code or crashing, please provide the build logs.

## Expected Behavior

If needed, provide a short description of how it should work.

## Environment

* Mockingbird CLI version (`mockingbird version`)
* Xcode and Swift version (`swift --version`)
* Package manager (CocoaPods, Carthage, SPM project, SPM package)
* Unit testing framework (XCTest, Quick/Nimble)
* Custom configuration
- [ ] Mockingbird ignore files
- [ ] Supporting source files
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Pull Request
about: Submit a new pull request
title: ''
labels: ''
assignees: ''

---

## Overview

The motivation for making this change, what it does, and any additional considerations.

## Test Plan

Demonstrate that the code is solid. For example, commands that you ran and their output.
49 changes: 46 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '*'

jobs:
build:
build-signed-artifacts:
name: Build Signed Artifacts
runs-on: macOS-latest
steps:
Expand Down Expand Up @@ -40,10 +40,53 @@ jobs:
- name: Upload CLI
uses: actions/upload-artifact@v2
with:
name: Mockingbird
name: Mockingbird.zip
path: .build/mockingbird/artifacts/Mockingbird.zip
- name: Upload Framework
uses: actions/upload-artifact@v2
with:
name: Mockingbird.xcframework
name: Mockingbird.xcframework.zip
path: .build/mockingbird/artifacts/Mockingbird.xcframework.zip

build-docs:
name: Build Docs
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Set Up Project
run: Sources/MockingbirdAutomationCli/buildAndRun.sh configure load --overwrite

- name: Checkout Swift-DocC
uses: actions/checkout@v2
with:
repository: apple/swift-docc
path: swift-docc
- name: Build Swift-DocC
working-directory: swift-docc
run: swift build --configuration release

- name: Checkout Swift-DocC-Render
uses: actions/checkout@v2
with:
repository: apple/swift-docc-render
path: swift-docc-render
- name: Patch Swift-DocC-Render
working-directory: swift-docc-render
run: git apply ../Sources/Documentation/Patches/swift-docc-render/*.patch
- name: Build Swift-DocC-Render
working-directory: swift-docc-render
run: |
npm install
npm run build
- name: Build DocC Archive
run: |
Sources/MockingbirdAutomationCli/buildAndRun.sh build docs \
--docc swift-docc/.build/release/docc \
--renderer swift-docc-render/dist \
--archive .build/mockingbird/artifacts/Mockingbird.doccarchive.zip
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Mockingbird.doccarchive.zip
path: .build/mockingbird/artifacts/Mockingbird.doccarchive.zip
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ Packages/
.swiftpm/
/Package.resolved

## DocC
.docc-build

## macOS
.DS_Store
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

11 changes: 0 additions & 11 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit b491852

Please sign in to comment.