Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not generate documentation in swift with jazzy #255

Closed
ryujik opened this issue Jul 2, 2015 · 5 comments

Comments

@ryujik
Copy link

commented Jul 2, 2015

Hi, I have a project test and I want generate document this project. Although show me success in console generate document jazzy, but not generate document for swift project. It's blank. I'm sure doing something wrong, but I don't know what. Do I need configure something? or Do I documenting wrong in my code? Please help me, about how use correctly jazzy. Thanks you for your help. (This example class is http://nshipster.com/swift-documentation/)

import Foundation

/// 🚲 A two-wheeled, human-powered mode of transportation.
class Bicycle {
    /**
    Frame and construction style.

    - Road: For streets or trails.
    - Touring: For long journeys.
    - Cruiser: For casual trips around town.
    - Hybrid: For general-purpose transportation.
    */
    enum Style {
        case Road, Touring, Cruiser, Hybrid
    }

    /**
    Mechanism for converting pedal power into motion.

    - Fixed: A single, fixed gear.
    - Freewheel: A variable-speed, disengageable gear.
    */
    enum Gearing {
        case Fixed
        case Freewheel(speeds: Int)
    }

    /**
    Hardware used for steering.

    - Riser: A casual handlebar.
    - Café: An upright handlebar.
    - Drop: A classic handlebar.
    - Bullhorn: A powerful handlebar.
    */
    enum Handlebar {
        case Riser, Café, Drop, Bullhorn
    }

    /// The style of the bicycle.
    let style: Style

    /// The gearing of the bicycle.
    let gearing: Gearing

    /// The handlebar of the bicycle.
    let handlebar: Handlebar

    /// The size of the frame, in centimeters.
    let frameSize: Int

    /// The number of trips travelled by the bicycle.
    private(set) var numberOfTrips: Int

    /// The total distance travelled by the bicycle, in meters.
    private(set) var distanceTravelled: Double

    /**
    Initializes a new bicycle with the provided parts and specifications.

    :param: style The style of the bicycle
    :param: gearing The gearing of the bicycle
    :param: handlebar The handlebar of the bicycle
    :param: centimeters The frame size of the bicycle, in centimeters

    :returns: A beautiful, brand-new, custom built just for you.
    */
    init(style: Style, gearing: Gearing, handlebar: Handlebar, frameSize centimeters: Int) {
        self.style = style
        self.gearing = gearing
        self.handlebar = handlebar
        self.frameSize = centimeters

        self.numberOfTrips = 0
        self.distanceTravelled = 0
    }

    /**
    Take a bike out for a spin.

    :param: meters The distance to travel in meters.
    */
    func travel(distance meters: Double) {
        if meters > 0 {
            distanceTravelled += meters
            ++numberOfTrips
        }
    }
}

Show me this in terminal

Running xcodebuild
Parsing Person.swift (1/3)
Parsing ViewController.swift (2/3)
Parsing AppDelegate.swift (3/3)
building site
jam out ♪♫ to your fresh new docs in `docs`
@ryujik

This comment has been minimized.

Copy link
Author

commented Jul 2, 2015

Apparently I solved put 'public' the class and methods, but these is correct?

@segiddins

This comment has been minimized.

Copy link
Collaborator

commented Jul 2, 2015

@ryujik yes, by default jazzy only documents public members. You can change this by passing the --min-acl flag, with an option of internal or private if you'd like to document those ACL levels as well.

@segiddins segiddins closed this Jul 2, 2015
@douglastaquary

This comment has been minimized.

Copy link

commented Mar 10, 2016

In my case, i did deleted /docs into project and run again jazzy --min-acl internal. Its work for me!

@ashishkarna

This comment has been minimized.

Copy link

commented Jun 28, 2016

jazzy --min-acl internal

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/0h/7_n82hbn4rxgr5ngmhvjgvd80000gp/T/xcodebuild-7A035436-70E9-4DE1-9124-A45056593C0A.log
Failed to generate documentation
/Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/executable.rb:36:in `execute_command': /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/SourceKitten/bin/sourcekitten "doc", "--"

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/0h/7_n82hbn4rxgr5ngmhvjgvd80000gp/T/xcodebuild-7A035436-70E9-4DE1-9124-A45056593C0A.log

Failed to generate documentation
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/sourcekitten.rb:147:in run_sourcekitten' from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:64:inblock in build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:62:in chdir' from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/lib/jazzy/doc_builder.rb:62:inbuild'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.7.0/bin/jazzy:15:in <top (required)>' from /usr/local/bin/jazzy:23:inload'
from /usr/local/bin/jazzy:23:in `

'

How to resolve this issue . Need help

@douglastaquary

This comment has been minimized.

Copy link

commented Jun 28, 2016

@ashishkarna You can try to delete the folder /docs into project and run again jazzy--min-acl internal.

@non-binary non-binary modified the milestone: The Past Nov 22, 2016
@non-binary non-binary added the question label Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.