Generate Markdown documentation from source code

Overview

SourceDocs

Release Build Status codecov Swift 5.0 Swift Package Manager Compatible codebeat badge

SourceDocs Header

SourceDocs is a command line tool that generates markdown documentation files from inline source code comments.

Terminal Output

Similar to Sphinx or Jazzy, SourceDocs parses your Swift source code and generates beautiful reference documentation. In contrast to those other tools, SourceDocs generates markdown files that you can store and browse inline within your project repository. Or even render with GitHub Pages.

Features

  • Generate reference documentation from Xcode projects
  • Generate reference documentation from Swift Packages
  • Generate package description documentation from Swift Packages

Generated documentation

SourceDocs writes documentation files to the Documentation/Reference directory relative to your project root (path can be configured). This allows for the generated documentation to live along other hand-crafted documentation you might have written or will write in the future.

When specifying a module name, the documentation files will be written to Documentation/Reference/<module name>.

It's recommended adding this generated documentation to the source code repository, so it can be easily browsed inline. GitHub, BitBucket and other source control platforms do a great job rendering Markdown files, so documentation is easy to read.

Examples of Generated Documentation

Usage

Swift Packages

To generate documentation for a Swift Package, run sourcedocs from the root of your package repository.

$ cd path/to/MyPackage
$ sourcedocs generate --all-modules

This command will generate documentation for each module in your Swift package.

For a specific module, pass the module name using the --spm-module parameter.

$ sourcedocs generate --spm-module SourceDocsDemo

Xcode Projects

To generate documentation from your source code, run sourcedocs directly from the root your Xcode project.

$ cd path/to/MyAppOrFramework
$ sourcedocs generate

This command will analyze your Xcode project and generate reference documentation from all public types found.

Usually, for most Xcode projects, no parameters are needed at all. xcodebuild should be able to find the default project and scheme.

If the command fails, try specifying the scheme (-scheme SchemeName) or the workspace. Any arguments passed to sourcedocs after -- will be passed to xcodebuild without modification.

$ sourcedocs generate -- -scheme MyScheme

Usage options

Typing sourcedocs help we get a list of all available commands:

$ sourcedocs help
USAGE: source-docs <subcommand>

OPTIONS:
  -h, --help              Show help information.

SUBCOMMANDS:
  clean                   Delete the output folder and quit.
  generate                Generates the Markdown documentation
  package                 Generate PACKAGE.md from Swift package description.
  version                 Display the current version of SourceDocs

Typing sourcedocs help <command> we get a list of all options for that command:

$ sourcedocs generate --help

OVERVIEW: Generates the Markdown documentation

USAGE: source-docs generate <options>

ARGUMENTS:
  <xcode-arguments>       List of arguments to pass to xcodebuild 

OPTIONS:
  -a, --all-modules       Generate documentation for all modules in a Swift package 
  --spm-module <spm-module>
                          Generate documentation for Swift Package Manager module 
  --module-name <module-name>
                          Generate documentation for a Swift module 
  --link-beginning <link-beginning>
                          The text to begin links with 
  --link-ending <link-ending>
                          The text to end links with (default: .md)
  -i, --input-folder <input-folder>
                          Path to the input directory (default: /Users/ramses.alonso/Development/eneko/SourceDocs)
  -o, --output-folder <output-folder>
                          Output directory to clean (default: Documentation/Reference)
  --min-acl <min-acl>     Access level to include in documentation [private, fileprivate, internal, public, open] (default: public)
  -m, --module-name-path  Include the module name as part of the output folder path 
  -c, --clean             Delete output folder before generating documentation 
  -l, --collapsible       Put methods, properties and enum cases inside collapsible blocks 
  -t, --table-of-contents Generate a table of contents with properties and methods for each type 
  -r, --reproducible-docs Generate documentation that is reproducible: only depends on the sources.
                          For example, this will avoid adding timestamps on the generated files. 
  -h, --help              Show help information

Installation

Download Binary

$ curl -Ls https://github.com/eneko/SourceDocs/releases/latest/download/sourcedocs.macos.zip -o /tmp/sourcedocs.macos.zip
$ unzip -j -d /usr/local/bin /tmp/sourcedocs.macos.zip 

From Sources

Requirements:

  • Swift 5.1 runtime and Xcode installed in your computer.

Using Homebrew

$ brew install sourcedocs

Building with Swift Package Manager

$ git clone https://github.com/eneko/SourceDocs.git
$ cd SourceDocs
$ make

Contact

Follow and contact me on Twitter at @eneko.

Contributions

If you find an issue, just open a ticket on it. Pull requests are warmly welcome as well.

License

SourceDocs is licensed under the MIT license. See LICENSE for more info.

Comments
  • Option to skip elements with no comments

    Option to skip elements with no comments

    Hello, I'm trying to use your tool on large project. Generating documentation for all files makes it rather not usable for us, therefore I tried to implement new option to skip files/elements with no comments. Feel free to review and request changes if needed.

    Breaking

    • None

    Enhancements

    • Option to skip elements with no comments

    Bug Fixes

    • None
    opened by Fiser33 8
  • Move most stuff to a lib

    Move most stuff to a lib

    Enhancements

    • Created a SourceDocsLib which can be imported separately from the executable, and used within Swift Package Manager Scripts
    • Made a bunch of stuff public to facilitate this

    Bug Fixes

    • Reset the markdown index when generation exits to allow multiple generation runs in one go without all targets getting all markdown
    • Enabled the access level tests

    Further comments

    • For some weird reason this is only working with my project when I do swift run MyProject and not when I build my project in Xcode. When I build in Xcode i'm getting Please confirm thatxcodebuildis building a Swift module.. I think from looking at a bunch of issues on Jazzy, this is probably related to SourceKitten, which they also depend on. However, I think this is at least workable in terms of running on the command line similarly to the previous version.
    • Tests are passing when run via swift test but will fail if run via Xcode - the system lib seems to not really enjoy being run from Xcode.
    • Commandant and a bunch of other stuff being used here just pipe everything out to stdout, which makes it awfully hard to test. I know there's ShellOut that returns strings in addition to sending them to the console, which makes it a LOT easier to test that things are working correctly.

    I'm good with this getting merged as a phase one since it works, but wanted to share those notes for use in terms of future rethinks.

    opened by designatednerd 8
  • Add 'min-acl' to let users determine the minimum access level to gene…

    Add 'min-acl' to let users determine the minimum access level to gene…

    …rate the documentation

    Breaking

    • None

    Enhancements

    • Adds min-acl parameter that allows private | fileprivate | internal | public | open options, defaults to public as for now.

    Bug Fixes

    • None
    opened by minuscorp 8
  • Add/customizable file ending

    Add/customizable file ending

    Hey, thanks so much for this project, it's super awesome. I'm using it to generate markdown-based documentation for apollo-ios since we've already got a theme that can generate HTML pages based on Markdown. The only issue is when that theme sees .md at the end of a link, it links directly to the markdown file rather than to the generated HTML page.

    This PR adds the ability to customize the text at the end of a link in the README - in our case, switching to / instead of .md leads to the desired behavior, but in other cases someone might want .html instead. This change retains existing behavior of using .md as a link ending by default.

    I also committed changes which were automatically applied to Package.lock when using swift run - let me know if you want me to revert that one, but it does not appear to have had any adverse affects.

    Enhancements

    • Added ability to pass in a --link-ending parameter so that links in README.md index can be customized.
    opened by designatednerd 6
  • Fixes for nested types

    Fixes for nested types

    Solves https://github.com/eneko/SourceDocs/issues/50

    Also, some other changes:

    • Fixed typealias doc generation
    • Added option reproducibleDocs in order to be able to generate reproducible documentation
    • Added checks on CI for docs and linux tests
    opened by acecilia 5
  • Requires Xcode arguments

    Requires Xcode arguments

    Brief Description

    Previously I could run swift run source-docs generate -c --spm-module OrchardNestKit

    However there appears to be a change which requires <xcode-arguments>

    It seems either documentation should be updated or there's a bug. If I run:

    swift run sourcedocs generate build -c --spm-module OrchardNestKit

    The documentation works fine.

    • Operating System: macOS 11
    • Xcode Version: 12.0 beta 4
    • SwiftDocs Version/SHA: ?
    • Swift version: 5.3

    Demo Project

    Check out CI error here: https://github.com/brightdigit/OrchardNest/pull/61/checks?check_run_id=995029147

    opened by leogdion 4
  • Error: Failed to generate documentation

    Error: Failed to generate documentation

    Brief Description

    First try, can't produce the documentation.

    Just install with brew. cd to the XCode project, typed "sourcedocs generate", end up with

    Running xcodebuild Could not parse compiler arguments from xcodebuild output. Please confirm that xcodebuild is building a Swift module. Saved xcodebuild log file: /var/folders/9r/8wny4fv104z6hpdv5k8m5gsc0000gn/T/xcodebuild-A7DB1988-E214-4030-9D90-9C5A9AEC9A9E.log Error: Failed to generate documentation.

    The log file is miles long, but ends with

    ** BUILD SUCCEEDED **

    It is a swift framework with only one class

    Steps to Reproduce

    See above

    Expected Outcome

    I would expect the documentation to generate

    Actual Outcome

    Nothing but the error message shown above

    Environment

    • Operating System: macOS 10.14.6
    • Xcode Version: 10.3
    • SwiftDocs Version/SHA: ????
    • Swift version: 5.1
    opened by Mini-Stef 4
  • SourceDocs seems to be skipping all open classes?

    SourceDocs seems to be skipping all open classes?

    Brief Description

    I run sourcedocs generate -c -l -t in the root of my workspace. I can see all of my classes being parsed but all open classes are being skipped.

    Steps to Reproduce

    1. Create a framework or module with classes that are open and classes that are public.
    2. Run sourcedocs generate -c -l -t.

    Expected Outcome

    All classes should have a generated markdown file.

    Actual Outcome

    Only classes that have public accessibility are generated. This is because hasPublicACL is only checking for public, not open in this class: https://github.com/eneko/SourceDocs/blob/b5bff79481b576eca99f9621296b8f33f72e1e11/Sources/SourceDocs/Classes/SwiftDocDictionary.swift `

    Environment

    • Operating System: macOS 10.14.5
    • Xcode Version: 10.2
    • SwiftDocs Version/SHA: 0.1.0 -> Not sure.
    • Swift version: 5.0

    Additional Comments

    I tried to build this with make install so that I can fix this bug and submit a PR but I ran into linker issues(this is just part of the log it was too long for the issue):

     "_swift_storeEnumTagSinglePayloadGeneric", referenced from:
          _$s10Commandant8ArgumentVwst in Argument.swift.o
          _$s10Commandant6OptionVwst in Option.swift.o
          _$s4Yams4Pair33_2EA47F6402A38415204E0D1E326B0671LLVwst in Node.Mapping.swift.o
      "_swift_unexpectedError", referenced from:
          _$sSo8CXCursora21SourceKittenFrameworkE3strSSSgyF in Clang+SourceKitten.swift.o
          _$sSo8CXCursora21SourceKittenFrameworkE4nameSSyFTf4x_n in Clang+SourceKitten.swift.o
          _$s21SourceKittenFramework4FileC8contentsSSvgyyXEfU_ in File.swift.o
          _$s21SourceKittenFramework6ModuleV19xcodeBuildArguments4name6inPathACSgSaySSG_SSSgSStcfC in Module.swift.o
          _$s21SourceKittenFramework0A11DeclarationV11accessorUSR33_D57F9DC6F0FBA1C341F3C3063B352D9ALL6getterSSSb_tF in SourceDeclaration.swift.o
          _$sSS21SourceKittenFrameworkE11commentBody5rangeSSSgSo8_NSRangeVSg_tFTf4nx_n in String+SourceKitten.swift.o
          _$sSS21SourceKittenFrameworkE11pragmaMarks8filename13excludeRanges5limitSayAA0A11DeclarationVGSS_SaySo8_NSRangeVGAJSgtFTf4xnnx_n in String+SourceKitten.swift.o
          ...
      "_swift_unknownObjectRelease", referenced from:
          _$sSD17dictionaryLiteralSDyxq_Gx_q_td_tcfCTf4gn_n in Argument.swift.o
          _$s10Commandant14ArgumentParserCyACSaySSGcfcTf4gn_n in ArgumentParser.swift.o
          _$sSayxSicir in Command.swift.o
          _$s10Commandant15CommandRegistryC4main9arguments11defaultVerb12errorHandlers5NeverOSaySSG_SSyxXEtFTf4nxnn_n in Command.swift.o
          _$s10Commandant11HelpCommandV3runy6ResultAEOyytxGAA0B7OptionsVyxGF in HelpCommand.swift.o
          _$s7Rainbow12OutputTargetO7currentACvpZfiACyXEfU_ in OutputTarget.swift.o
          _$s9SWXMLHash13IndexingErrorOWOe in SWXMLHash.swift.o
          ...
      "_swift_unknownObjectRetain", referenced from:
          _$sSD17dictionaryLiteralSDyxq_Gx_q_td_tcfCTf4gn_n in Argument.swift.o
          _$s10Commandant14ArgumentParserCyACSaySSGcfcTf4gn_n in ArgumentParser.swift.o
          _$sSayxSicir in Command.swift.o
          _$s9SWXMLHash13IndexingErrorO11descriptionSSvg in SWXMLHash.swift.o
          _$ss12_ArrayBufferV19_getElementSlowPathyyXlSiF9SWXMLHash7IndexOpC_Tg5Tm in SWXMLHash.swift.o
          _$s9SWXMLHash13IndexingErrorOWOy in SWXMLHash.swift.o
          _$s9SWXMLHash13IndexingErrorOWOy in XMLIndexer+XMLIndexerDeserializable.swift.o
          ...
      "_swift_updateClassMetadata2", referenced from:
          _$s9SWXMLHash0A7OptionsCMr in SWXMLHash.swift.o
      "_swift_willThrow", referenced from:
          _$s10Commandant14CommandWrapperVyxGADSbs5Error_pIgggdzo_A2DSbsAE_pIegnndzo_sAERzlTRTA in Command.swift.o
          _$s10Commandant14CommandWrapperVyxGSis5Error_pIggdzo_ADSisAE_pIegnrzo_sAERzlTRTA in HelpCommand.swift.o
          _$s10Commandant10OrderedSetVyxGSTAAST32withContiguousStorageIfAvailableyqd__Sgqd__SRy7ElementQzGKXEKlFTW in OrderedSet.swift.o
          _$sxSSSgs5Error_pIgnozo_xAAsAB_pIegnrzo_lTRTA in Extensions.swift.o
          _$s6ResultAAO3getxyKF in Result.swift.o
          _$s9SWXMLHash10XMLIndexerOyACyXlKcfC in SWXMLHash.swift.o
          _$s9SWXMLHash10XMLIndexerO5byKeyyACSSKFTf4xn_n in SWXMLHash.swift.o
          ...
    ld: symbol(s) not found for architecture x86_64
    
    opened by abushnaq-work 4
  • Cannot be installed via Homebrew on Mojave

    Cannot be installed via Homebrew on Mojave

    I am trying to install SourceDocs via Homebrew on OSX Mojave and keep getting the following errors:

    BUD-MAC-203:liligo-reborn viktor.plezer$ brew install eneko/tap/sourcedocs
    ==> Installing sourcedocs from eneko/tap
    ==> Downloading https://github.com/eneko/SourceDocs/archive/0.5.0.tar.gz
    Already downloaded: /Users/viktor.plezer/Library/Caches/Homebrew/downloads/b8e719535511822a9f8eac2678de3a7d6d461281c0f7a86ee69346094c4f5b1b--SourceDocs-0.5.0.tar.gz
    ==> Building SourceDocs
    ==> swift build --disable-sandbox -c release -Xswiftc -static-stdlib
    Last 15 lines from /Users/viktor.plezer/Library/Logs/Homebrew/sourcedocs/01.swift:
    /private/tmp/sourcedocs-20180926-32065-q3lt60/SourceDocs-0.5.0/.build/checkouts/SourceKitten.git--835485570352228582/Source/SourceKittenFramework/library_wrapper_sourcekitd.swift:63:95: warning: using '!' is not allowed here; treating this as '?' instead
    internal let sourcekitd_response_description_copy: @convention(c) (sourcekitd_response_t) -> (UnsafeMutablePointer<Int8>!) = library.load(symbol: "sourcekitd_response_description_copy")
                                                                                                  ^                         ~
                                                                                                                            ?
    /private/tmp/sourcedocs-20180926-32065-q3lt60/SourceDocs-0.5.0/.build/checkouts/SourceKitten.git--835485570352228582/Source/SourceKittenFramework/library_wrapper_sourcekitd.swift:66:93: warning: using '!' is not allowed here; treating this as '?' instead
    internal let sourcekitd_variant_description_copy: @convention(c) (sourcekitd_variant_t) -> (UnsafeMutablePointer<Int8>!) = library.load(symbol: "sourcekitd_variant_description_copy")
                                                                                                ^                         ~
                                                                                                                          ?
    /private/tmp/sourcedocs-20180926-32065-q3lt60/SourceDocs-0.5.0/.build/checkouts/SourceKitten.git--835485570352228582/Source/SourceKittenFramework/library_wrapper_sourcekitd.swift:67:98: warning: using '!' is not allowed here; treating this as '?' instead
    internal let sourcekitd_variant_json_description_copy: @convention(c) (sourcekitd_variant_t) -> (UnsafeMutablePointer<Int8>!) = library.load(symbol: "sourcekitd_variant_json_description_copy")
                                                                                                     ^                         ~
                                                                                                                               ?
    error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /private/tmp/sourcedocs-20180926-32065-q3lt60/SourceDocs-0.5.0/.build/release.yaml main output:
        
    
    
    If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
    https://github.com/eneko/homebrew-tap/issues
    
    bug 
    opened by viplezer 4
  • Can not install with homebrew

    Can not install with homebrew

    Brief Description

    In your README.md you have a description how to install with Homebrew. It does not for me.

    Steps to Reproduce

    1. Enter $ brew install eneko/tap/sourcedocs

    Expected Outcome

    Installing sourcedocs without errors

    Actual Outcome

    $ brew install eneko/tap/sourcedocs
    ==> Tapping eneko/tap
    Cloning into '/usr/local/Homebrew/Library/Taps/eneko/homebrew-tap'...
    remote: Counting objects: 4, done.
    remote: Compressing objects: 100% (3/3), done.
    remote: Total 4 (delta 0), reused 3 (delta 0), pack-reused 0
    Unpacking objects: 100% (4/4), done.
    Tapped 1 formula (28 files, 21.3KB).
    ==> Installing sourcedocs from eneko/tap
    sourcedocs: A full installation of Xcode.app is required to compile this software.
    Installing just the Command Line Tools is not sufficient.
    Xcode can be installed from the App Store.
    Error: An unsatisfied requirement failed this build.
    

    Environment

    • Operating System: macOS 10.13.4
    • SwiftDocs Version/SHA: b5bff79481b576eca99f9621296b8f33f72e1e11
    • Swift version: 4.1

    Additional Comments

    Do I need Xcode installed? It is no prerequisite in the README.md.

    Demo Project

    none

    opened by BinaryHammer 4
  • Xcode 13 build issues

    Xcode 13 build issues

    Current version (1.2.1) of SourceDocs is not building on Xcode 13 as a standalone project or a dependency.

    Steps to Reproduce

    1. Try to build SourceDocs with Xcode 13
    2. Get a billion errors
    3. Update Swift-Tools from 5.1 to 5.5 and fix associated warnings from the compiler (see https://github.com/designatednerd/SourceDocs/commit/392cf21f2cfb7cd2f4ff7c7189775f4a66cb2549), see at least some improvements
    4. Attempt to update libraries to fix it, doesn't work (tried swift-package-manager 0.6, SourceKitten 0.31 + downgrading the SwiftArgumentParser version to match it, Leaving SourceKitten where it was and updating SwiftArgumentParser to 1.0.1)

    Environment

    • Operating System: macOS 11.6
    • Xcode Version: 13
    • SwiftDocs Version/SHA: 1.2.1
    • Swift version: 5.5

    Note that I'm on an M1 mac and have not tried it on a non-M1, but if it's working for you that cold be a clue.

    Additional Comments

    There's some stuff on the SwiftPM repo that looks like it might fix this (basically, using SwiftPMDataModel-auto instead of SwiftPM-auto which doesn't have nearly as many dependencies), but it's not been released in a tagged version, and pointing to a specific commit would basically mean this can't be distributed as a library because commit-based releases can't be used in conjunction with tag based releases.

    Banged my head on this for a couple hours, would appreciate any help!

    opened by designatednerd 3
  • --skip-empty option in main and README but not in the latest release

    --skip-empty option in main and README but not in the latest release

    Even though the PR for the added feature with the option to skip elements with no comments (--skip-empty) has been merged since May 24th (#76), there hasn't been a release with that new feature.

    The new option is even found in the README in the main branch but it's not usable as it's not included in the latest release.

    opened by jcabreram 3
  • SourceDocs install fails on Big Sur

    SourceDocs install fails on Big Sur

    Brief Description

    I am getting what looks to be a Monterey specific error when trying to install SourceDocs on Big Sur. I am running Big Sur 11.6.8 with Xcode 13.1 with Swift 5.5.1. From the matrix on the README it should work, however I get the following error:

    ==> swift build --disable-sandbox -c release
    Last 15 lines from /Users/homebrew/Library/Logs/Homebrew/sonos-sourcedocs/01.swift:
    /private/tmp/sonos-sourcedocs-20220919-42351-wyrqry/SourceDocs-2.0.1/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/AsyncParsableCommand.swift:23:17: note: add @available attribute to enclosing instance method
      mutating func run() async throws
                    ^
    /private/tmp/sonos-sourcedocs-20220919-42351-wyrqry/SourceDocs-2.0.1/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/AsyncParsableCommand.swift:33:29: error: concurrency is only available in macOS 12.0.0 or newer
      public static func main() async {
                                ^
    /private/tmp/sonos-sourcedocs-20220919-42351-wyrqry/SourceDocs-2.0.1/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/AsyncParsableCommand.swift:33:22: note: add @available attribute to enclosing static method
      public static func main() async {
                         ^
    /private/tmp/sonos-sourcedocs-20220919-42351-wyrqry/SourceDocs-2.0.1/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/AsyncParsableCommand.swift:63:29: error: concurrency is only available in macOS 12.0.0 or newer
      public static func main() async {
                                ^
    /private/tmp/sonos-sourcedocs-20220919-42351-wyrqry/SourceDocs-2.0.1/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Types/AsyncParsableCommand.swift:63:22: note: add @available attribute to enclosing static method
      public static func main() async {
    

    Does the concurrency is only available in macOS 12.0.0 or newer error mean that 2.0.1 doesn't work on Big Sur?

    Steps to Reproduce

    1. brew install sourcedocs

    Expected Outcome

    I expect that SourceDocs would be installed.

    Actual Outcome

    I get the error listed above.

    Environment

    • Operating System: macOS 11.6.8
    • Xcode Version: 13.1
    • SwiftDocs Version/SHA: Where is this listed? Isn't this bundled with Swift?
    • Swift version: 5.5.1

    Additional Comments

    Demo Project

    opened by vernonlingleysonos 0
  • Excluding specific files or classes

    Excluding specific files or classes

    It seems that excluding specific files or classes from generated documentation is not possible. I think that an option to exclude some specific classes or at least files would be useful. Or perhaps an option to ignore classes/enums/etc. that are not documented in code.

    opened by leszek-s 0
  • [1]    17458 illegal hardware instruction  sourcedocs generate -- -scheme MyFramework

    [1] 17458 illegal hardware instruction sourcedocs generate -- -scheme MyFramework

    Using this command sourcedocs generate -- -scheme MyFramework

    The framework has around 40 swift files which has documentation in it.

    After parsing some 10 files, it is throwing this error [1] 17458 illegal hardware instruction sourcedocs generate -- -scheme MyFramework

    Please help with this

    opened by suhas03su 4
  • SPM build manifest does not exist at `.build/debug.yaml` or does not match expected format.

    SPM build manifest does not exist at `.build/debug.yaml` or does not match expected format.

    When I try to build docs for source docs, as shown in the readme, it doesn't work. On an M1 Mac.

    Brief Description

    % sourcedocs generate --spm-module SourceDocsDemo 
    Processing SwiftPM module SourceDocsDemo...
    SPM build manifest does not exist at `<redacted>/.build/debug.yaml` or does not match expected format.
    Error: Error: Failed to generate documentation for SwiftPM module 'SourceDocsDemo'.
    

    Steps to Reproduce

    1. Download tag 2.0 (or main)
    2. Unzip to folder SourceDocs-download
    3. cd SourceDocs-download
    4. sourcedocs generate --spm-module SourceDocsDemo
    5. Get error

    Expected Outcome

    It builds docs.

    Actual Outcome

    Error, no docs built

    Environment

    Xcode 13.1

    MacBook Pro M1

    swift-driver version: 1.26.9 Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) Target: arm64-apple-macosx12.0

    Mac OS 12.0.1

    SourceDocs v2.0.0

    Additional Comments

    Demo Project

    Using the main repo's demo project

    opened by spnkr 3
Releases(2.0.1)
  • 2.0.1(Apr 2, 2022)

  • 2.0.0(Nov 29, 2021)

  • 1.2.1(Jul 31, 2020)

  • 1.2.0(Jun 4, 2020)

  • 1.1.0(May 27, 2020)

    Breaking

    • None

    Enhancements

    • New --all-modules parameter to generate documentation for all swift modules in a package (#49)
    • New --reproducible-docs parameter to generate reproducible documentation (#51)

    Bug Fixes

    • Fix issue #50, where nested types where documented out of their parent context (#51)
    Source code(tar.gz)
    Source code(zip)
    sourcedocs.macos.zip(3.40 MB)
  • 1.0.0(May 11, 2020)

  • 0.6.1(Nov 3, 2019)

  • 0.6.0(Nov 1, 2019)

    Breaking

    • SourceDocs now requires Swift 5.0 or higher

    Enhancements

    • Add ability to pass in link ending text as a parameter (#20)
    • Add ability to specify input folder (#20)
    • Add customizable file beginning (#20)
    • Add --min-acl to let users determine the minimum access level to generate the documentation (#28)

    Bug Fixes

    • None
    Source code(tar.gz)
    Source code(zip)
    sourcedocs.macos.zip(904.19 KB)
  • 0.5.1(Sep 26, 2018)

  • 0.5.0(Nov 14, 2017)

  • 0.4.0(Oct 25, 2017)

    Breaking

    • Updated command line argument handling:
      • Use sourcedocs generate <options> to generate documentation.
      • Use sourcedocs clean <options> to delete the output folder.
      • Use sourcedocs help <command> for more help.
    • Update default output directory to Documentation/Reference

    Enhancements

    • Customize output folder with --output-folder.
    • Clean output before generating documentation with --clean.
    • Terminal output is now routed through stdout/stderr.
    • Removed "Declaration" title to reduce noise.
    • New flag --module-name-path to explicitly include module name in output path.

    Bug Fixes

    • Documentation links now work both on Markdown and rendered GitHub Pages.
    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Oct 9, 2017)

    Breaking

    • None

    Enhancements

    • Use MarkdownGenerator framework to generate Markdown output.
    • Remove inferred type from output to reduce noise.
    • Add contents table for structs, classes and enums.
    • Comment output is now block-quoted for better formatting.
    • Green checkmarks when writing Markdown files to disk.
    • Remove <sub> HTML tags for a cleaner Markdown output.
    • Remove horizontal guides to reduce noise.

    Bug Fixes

    • None
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Oct 6, 2017)

    Breaking

    • Update output directory to Docs/Reference to follow Swift Package Manager naming conventions for the project folder structure.

    Enhancements

    • Add --clean option to remove Reference Docs folder
    • Add --version option to display current version
    • Update --help command
    • Add Makefile for easier manual build and installation

    Bug Fixes

    • None
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Oct 6, 2017)

Owner
Eneko Alonso
I love coding in Swift, building apps, CLI tools, and AWS services (AWS certified). Currently Application Architect at @mindbody
Eneko Alonso
Swift tool to generate Module Interfaces for Swift projects.

ModuleInterface Swift tool to generate Module Interfaces for Swift projects. What is a Module Interface A Module Interface is what we commonly get usi

Jorge Revuelta 75 Dec 21, 2022
A command-line tool to generate a JSON-list of all used SPM-dependencies of an Xcode-project.

SwiftPackageList A command-line tool to generate a JSON-list of all used SPM-dependencies of an Xcode-project. This includes all the Package.resolved

Felix Herrmann 14 Jan 8, 2023
A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

hhe-dev 10 Feb 17, 2022
Swift Package (Command) Plugin to format source code with nicklockwood/SwiftFormat

SwiftFormatPlugin A Swift Package Plugin to format source code with SwiftFormat. Add to Package Add the package to your dependencies. dependencies: [

Marco Eidinger 36 Dec 6, 2022
Generate Markdown documentation from source code

SourceDocs SourceDocs is a command line tool that generates markdown documentation files from inline source code comments. Similar to Sphinx or Jazzy,

Eneko Alonso 349 Dec 10, 2022
Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer documentation.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer docum

Apple 833 Jan 3, 2023
Swift Markdown is a Swift package for parsing, building, editing, and analyzing Markdown documents.

Swift Markdown is a Swift package for parsing, building, editing, and analyzing Markdown documents.

Apple 2k Dec 28, 2022
Generate help centers for your iOS apps, with Markdown

Generate help centers for your iOS apps, with Markdown! All you need to do is wr

Peter Salz 6 Jan 15, 2022
Generate SwiftUI Text or AttributedString from markdown strings with custom style names.

iOS 15.0 / macOS 12.0 / tvOS 15.0 / watchOS 8.0 StyledMarkdown is a mini library that lets you define custom styles in code and use them in your local

null 19 Dec 7, 2022
Code and documentation for my talk Anime-fy Yourself Using Core ML

Anime-fy Yourself Code and documentation for my talk Anime-fy Yourself Using Core ML Convert from PyTorch to Core ML To convert @bryandlee's PyTorch i

Yono Mittlefehldt 2 May 29, 2022
Objective-c code Apple style documentation set generator.

About appledoc IMPORTANT NOTICE: collaborators needed appledoc is command line tool that helps Objective-C developers generate Apple-like source code

tomaz 4.2k Dec 20, 2022
SwiftInitializerGenerator - Xcode Source Code Extension to Generate Swift Initializers

Swift Initializer Generator This Xcode Source Code Extension will generate a Swift initializer based on the lines you've selected. Handy if you made a

Bouke Haarsma 718 Aug 21, 2022
XcodeEquatableGenerator - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.

Depricated! There is not need for it at the moment as Swift compiler can do that for us ?? Swift Equatable Generator Xcode 8 Source Code Extension wil

null 191 Dec 10, 2022
nef💊a toolset to ease the creation of documentation in the form of Xcode Playgrounds

nef, short for Nefertiti, mother of Ankhesenamun, is a toolset to ease the creation of documentation in the form of Xcode Playgrounds. It provides com

Bow 257 Dec 6, 2022
docc2html - A static site generator for DocC documentation archives

Tool to convert "DocC" archives, a format to document Swift frameworks and packages: Documenting a Swift Framework or Package, to a static HTML site.

DocZ 105 Nov 14, 2022
The iOS framework that grows only as fast as its documentation

Nimbus is an iOS framework whose feature set grows only as fast as its documentation. Support status Nimbus is in a supported maintenance mode, meanin

featherless 6.5k Nov 30, 2022
Dash-iOS - Dash gives your iPad and iPhone instant offline access to 200+ API documentation sets

Discontinued Dash for iOS was discontinued. Please check out Dash for macOS instead. Dash for iOS Dash gives your iPad and iPhone instant offline acce

Bogdan Popescu 7.1k Dec 29, 2022
 Sample iOS App - A collection of examples and patterns for Unit Testing, UI Testing, handling Result/Optionals, writing documentation

 Sample iOS App - A collection of examples and patterns for Unit Testing, UI Testing, handling Result/Optionals, writing documentation, and more

Soojin Ro 206 Dec 9, 2022
Extract English from Documentation Comment.

E2DC Extract English text from Swift's Documentation Comment. ドキュメンテーションコメントに書かれた英語を翻訳したい場合に、便利かもしれないツールです。 (現時点では Swift のみ大雑把に対応) 2022-03-29.7.59.48.

Yusuke Hosonuma 6 Jul 19, 2022
Federal Data SDK built in the Swift programming language. Follow the link for the documentation:

Swift-Federal-Data-SDK Federal Data SDK built in the Swift programming language Until the Swift language becomes more stable, consider this a beta rel

null 65 May 28, 2022