Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

Closed
wants to merge 3 commits into from

2 participants

Karpich Dmitry Omar Khan
Karpich Dmitry

I think --private (as boolean key with default |true|) and --no-private (will set value to |false|) is looks like more predictable than --hide-private and have standart argv behavior, like many other cli program.
For example codo use this style.

Omar Khan
Owner

I don't know, I don't really like the idea of having a command line option that does nothing. If enough people push for this I'll change it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
14 README.md
Source Rendered
@@ -72,13 +72,13 @@ CoffeeDoc can be run from the command line:
72 72 Usage: coffeedoc [options] [targets]
73 73
74 74 Options:
75   - --output, -o Set output directory [default: "docs"]
76   - --parser Parser to use. Available parsers: commonjs, requirejs [default: "commonjs"]
77   - --renderer Renderer to use. Available renderers: html, gfm, json [default: "html"]
78   - --stdout Direct all output to stdout instead of files [boolean]
79   - --ignore, -i Files or directories to ignore
80   - --help, -h Show this help
81   - --hide-private Do not document methods beginning with an underscore [boolean]
  75 + --output, -o Set output directory [default: "docs"]
  76 + --parser Parser to use. Available parsers: commonjs, requirejs [default: "commonjs"]
  77 + --renderer Renderer to use. Available renderers: html, gfm, json [default: "html"]
  78 + --stdout Direct all output to stdout instead of files [boolean]
  79 + --ignore, -i Files or directories to ignore
  80 + --help, -h Show this help
  81 + --private Show methods beginning with an underscore (to hide --no-private) [boolean] [default: true]
82 82
83 83 If [targets] is a directory, CoffeeDoc will recursively document all `.coffee`
84 84 files found under that directory.
2  resources/github-wiki/module.eco
@@ -42,7 +42,7 @@
42 42 <% if method.docstring: %><%- method.docstring %><% end %>
43 43 <% end %>
44 44 <% end %>
45   - <% if not @options.hideprivate and cls.privatemethods.length > 0: %>
  45 + <% if @options.showprivate and cls.privatemethods.length > 0: %>
46 46 #### Private Methods
47 47 <% for method in cls.privatemethods: %>
48 48 ##### <a name="<%= method.name %>"><%= @module.quoteMarkdown(method.name) %>(<%= @module.params(method.params) %>)</a>
2  resources/html/module.eco
@@ -78,7 +78,7 @@
78 78 <% end %>
79 79 </div>
80 80 <% end %>
81   - <% if not @options.hideprivate and cls.privatemethods.length > 0: %>
  81 + <% if @options.showprivate and cls.privatemethods.length > 0: %>
82 82 <div class="privatemethods">
83 83 <h3>Private Methods</h3>
84 84 <% for method in cls.privatemethods: %>
7 src/docgen.coffee
@@ -30,8 +30,9 @@ exports.run = ->
30 30 .alias('i', 'ignore')
31 31 .describe('help', 'Show this help')
32 32 .alias('h', 'help')
33   - .describe('hide-private', 'Do not document methods beginning with an underscore')
34   - .boolean('hide-private')
  33 + .describe('private', 'Show methods beginning with an underscore (to hide --no-private)')
  34 + .boolean('private')
  35 + .default('private', true)
35 36
36 37 argv = opts.argv
37 38
@@ -77,7 +78,7 @@ exports.run = ->
77 78 getSourceFiles(o) for o in argv._
78 79 sources.sort()
79 80
80   - renderer = new rendercls({ hideprivate: argv['hide-private'] })
  81 + renderer = new rendercls({ showprivate: argv['private'] })
81 82
82 83 # Build a hash with documentation information for each source file.
83 84 modules = []

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.