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

* fix - rename key --hide-private to --private (as codo do) #33

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -72,13 +72,13 @@ CoffeeDoc can be run from the command line:
Usage: coffeedoc [options] [targets]

Options:
--output, -o Set output directory [default: "docs"]
--parser Parser to use. Available parsers: commonjs, requirejs [default: "commonjs"]
--renderer Renderer to use. Available renderers: html, gfm, json [default: "html"]
--stdout Direct all output to stdout instead of files [boolean]
--ignore, -i Files or directories to ignore
--help, -h Show this help
--hide-private Do not document methods beginning with an underscore [boolean]
--output, -o Set output directory [default: "docs"]
--parser Parser to use. Available parsers: commonjs, requirejs [default: "commonjs"]
--renderer Renderer to use. Available renderers: html, gfm, json [default: "html"]
--stdout Direct all output to stdout instead of files [boolean]
--ignore, -i Files or directories to ignore
--help, -h Show this help
--private Show methods beginning with an underscore (to hide --no-private) [boolean] [default: true]

If [targets] is a directory, CoffeeDoc will recursively document all `.coffee`
files found under that directory.
Expand Down
2 changes: 1 addition & 1 deletion resources/github-wiki/module.eco
Expand Up @@ -42,7 +42,7 @@
<% if method.docstring: %><%- method.docstring %><% end %>
<% end %>
<% end %>
<% if not @options.hideprivate and cls.privatemethods.length > 0: %>
<% if @options.showprivate and cls.privatemethods.length > 0: %>
#### Private Methods
<% for method in cls.privatemethods: %>
##### <a name="<%= method.name %>"><%= @module.quoteMarkdown(method.name) %>(<%= @module.params(method.params) %>)</a>
Expand Down
2 changes: 1 addition & 1 deletion resources/html/module.eco
Expand Up @@ -78,7 +78,7 @@
<% end %>
</div>
<% end %>
<% if not @options.hideprivate and cls.privatemethods.length > 0: %>
<% if @options.showprivate and cls.privatemethods.length > 0: %>
<div class="privatemethods">
<h3>Private Methods</h3>
<% for method in cls.privatemethods: %>
Expand Down
7 changes: 4 additions & 3 deletions src/docgen.coffee
Expand Up @@ -30,8 +30,9 @@ exports.run = ->
.alias('i', 'ignore')
.describe('help', 'Show this help')
.alias('h', 'help')
.describe('hide-private', 'Do not document methods beginning with an underscore')
.boolean('hide-private')
.describe('private', 'Show methods beginning with an underscore (to hide --no-private)')
.boolean('private')
.default('private', true)

argv = opts.argv

Expand Down Expand Up @@ -77,7 +78,7 @@ exports.run = ->
getSourceFiles(o) for o in argv._
sources.sort()

renderer = new rendercls({ hideprivate: argv['hide-private'] })
renderer = new rendercls({ showprivate: argv['private'] })

# Build a hash with documentation information for each source file.
modules = []
Expand Down