id stringlengths 34 124 | type stringclasses 4
values | prompt stringlengths 0 4.95k | response stringlengths 21 4.89k | source_lang stringclasses 3
values | target_lang stringclasses 2
values | repo stringclasses 75
values | path stringlengths 10 88 | license stringclasses 1
value | commit stringlengths 40 40 | stars int64 431 18.7k | source_url stringlengths 86 176 | line_start int64 1 214 | line_end int64 3 253 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored."
aliases: 'gh'
type: 'boolean'... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 56 | 105 | ||
nevir/groc:lib/cli.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignor... | ({
except: {
description: "Glob expression of files to exclude. Can be specified multiple times.",
aliases: 'e',
type: 'list'
},
github: {
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored.",
aliases: 'gh',
type: 'boolean'
},
out: {
... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 56 | 105 |
nevir/groc:lib/cli.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
({
except: {
description: "Glob expression of files to exclude. Can be specified multiple times.",
aliases: 'e',
type: 'list'
},
github: {
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored.",
... | except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored."
aliases: 'gh'
type: 'boolean'... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 56 | 105 |
nevir/groc:lib/cli.coffee:2:completion | completion | except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored."
aliases: 'gh'
type: 'boolean'... | default: '.'
type: 'path'
style:
description: "The style to use when generating documentation."
aliases: 's'
default: 'Default'
strip:
description: "A path prefix to strip when generating documentation paths (or --no-strip)."
aliases: 't'
verbose... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 56 | 105 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | # generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callb... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 106 | 155 | ||
nevir/groc:lib/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed... | // generated output.
var argv, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, project, projectConfig, projectConfigPath, ref, ref1, ref2, ref3;
projectConfigPath = path.resolve('.groc.json');
try {
projectConfig = JSON.parse(fs.readFileSync(projectConfigPath));
} catch (error) {
err = err... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// generated output.
var argv, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, project, projectConfig, projectConfigPath, ref, ref1, ref2, ref3;
projectConfigPath = path.resolve('.groc.json');
try {
projectConfig = JSON.parse(fs.readFile... | # generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callb... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:completion | completion | # generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callb... | # ## Project Generation
# A [Project](project.html) is just a handy way to configure the generation process, and is in
# charge of kicking that off.
project = new Project argv.root, argv.out
# `--verbose` and `--very-verbose` just impact the logging level of the project.
project.log.minLevel = utils.Logger:... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | # `Project#generate` can take some options, such as which style to use. Since we're generating
# differently depending on whether or not github is enabled, let's set those up now:
options =
style: styles[argv.style]
# Good to go!
unless argv.github
project.generate options, (error) ->
callback e... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 156 | 205 | ||
nevir/groc:lib/cli.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# `Project#generate` can take some options, such as which style to use. Since we're generating
# differently depending on whether or not github is enabled, let's set those up now:
options =
style: styles[argv.style]
# Good to go!
unless argv.github
... | // `Project#generate` can take some options, such as which style to use. Since we're generating
// differently depending on whether or not github is enabled, let's set those up now:
var options;
options = {
style: styles[argv.style]
};
// Good to go!
if (!argv.github) {
project.generate(options, function(error) ... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 156 | 205 |
nevir/groc:lib/cli.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// `Project#generate` can take some options, such as which style to use. Since we're generating
// differently depending on whether or not github is enabled, let's set those up now:
var options;
options = {
style: styles[argv.style]
};
// Good to go!
if (!argv... | # `Project#generate` can take some options, such as which style to use. Since we're generating
# differently depending on whether or not github is enabled, let's set those up now:
options =
style: styles[argv.style]
# Good to go!
unless argv.github
project.generate options, (error) ->
callback e... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 156 | 205 |
nevir/groc:lib/cli.coffee:4:completion | completion | # `Project#generate` can take some options, such as which style to use. Since we're generating
# differently depending on whether or not github is enabled, let's set those up now:
options =
style: styles[argv.style]
# Good to go!
unless argv.github
project.generate options, (error) ->
callback e... | project.outPath = path.resolve path.join '.git', 'groc-tmp'
# Dealing with generation for github pages is pretty involved, and requires a lot of back
# and forth with git. Rather than descend into callback hell in Node, we farm the logic
# out to a shell script.
project.generate options, (err... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 39a78f8c38714e56e047e0feaf61ca0749232218 | 579 | https://github.com/nevir/groc/blob/39a78f8c38714e56e047e0feaf61ca0749232218/lib/cli.coffee | 156 | 205 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | # generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callb... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a4c3162531d10bb6827e3c872a36bb7d8c090f6d | 579 | https://github.com/nevir/groc/blob/a4c3162531d10bb6827e3c872a36bb7d8c090f6d/lib/cli.coffee | 106 | 155 | ||
nevir/groc:lib/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed... | // generated output.
var argv, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, project, projectConfig, projectConfigPath, ref, ref1, ref2, ref3;
projectConfigPath = path.resolve('.groc.json');
try {
projectConfig = JSON.parse(fs.readFileSync(projectConfigPath));
} catch (error) {
err = err... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | a4c3162531d10bb6827e3c872a36bb7d8c090f6d | 579 | https://github.com/nevir/groc/blob/a4c3162531d10bb6827e3c872a36bb7d8c090f6d/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// generated output.
var argv, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, project, projectConfig, projectConfigPath, ref, ref1, ref2, ref3;
projectConfigPath = path.resolve('.groc.json');
try {
projectConfig = JSON.parse(fs.readFile... | # generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callb... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a4c3162531d10bb6827e3c872a36bb7d8c090f6d | 579 | https://github.com/nevir/groc/blob/a4c3162531d10bb6827e3c872a36bb7d8c090f6d/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:completion | completion | # generated output.
projectConfigPath = path.resolve '.groc.json'
try
projectConfig = JSON.parse fs.readFileSync projectConfigPath
catch err
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callb... | # ## Project Generation
# A [Project](project.html) is just a handy way to configure the generation process, and is in
# charge of kicking that off.
project = new Project argv.root, argv.out
# `--verbose` and `--very-verbose` just impact the logging level of the project.
project.log.minLevel = utils.Logger:... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a4c3162531d10bb6827e3c872a36bb7d8c090f6d | 579 | https://github.com/nevir/groc/blob/a4c3162531d10bb6827e3c872a36bb7d8c090f6d/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored."
aliases: 'gh'
type: 'boolean'... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 56 | 105 | ||
nevir/groc:lib/cli.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignor... | var err, projectConfig, projectConfigPath;
({
except: {
description: "Glob expression of files to exclude. Can be specified multiple times.",
aliases: 'e',
type: 'list'
},
github: {
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored.",
aliases: ... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 56 | 105 |
nevir/groc:lib/cli.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var err, projectConfig, projectConfigPath;
({
except: {
description: "Glob expression of files to exclude. Can be specified multiple times.",
aliases: 'e',
type: 'list'
},
github: {
description: "Generate your docs in the gh-pages branch of ... | except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored."
aliases: 'gh'
type: 'boolean'... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 56 | 105 |
nevir/groc:lib/cli.coffee:2:completion | completion | except:
description: "Glob expression of files to exclude. Can be specified multiple times."
aliases: 'e'
type: 'list'
github:
description: "Generate your docs in the gh-pages branch of your git repository. --out is ignored."
aliases: 'gh'
type: 'boolean'... | default: '.'
type: 'path'
strip:
description: "A path prefix to strip when generating documentation paths (or --no-strip)."
aliases: 's'
verbose:
description: "Output the inner workings of groc to help diagnose issues."
'very-verbose':
description: "Hey, you as... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 56 | 105 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 106 | 155 | ||
nevir/groc:lib/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) t... | var argv, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, project, ref, ref1, ref2, ref3;
if (err.code !== 'ENOENT') {
console.log(opts.help());
console.log;
utils.Logger.error("Failed to load .groc.json: %s", err.message);
return callback(err);
}
// We rely on [CLIHelpers.configureOptimist... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var argv, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, project, ref, ref1, ref2, ref3;
if (err.code !== 'ENOENT') {
console.log(opts.help());
console.log;
utils.Logger.error("Failed to load .groc.json: %s", err.message);
return callba... | unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:completion | completion | unless err.code == 'ENOENT'
console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.... | # charge of kicking that off.
project = new Project argv.root, argv.out
# `--verbose` and `--very-verbose` just impact the logging level of the project.
project.log.minLevel = utils.Logger::LEVELS.DEBUG if argv.verbose
project.log.minLevel = utils.Logger::LEVELS.TRACE if argv['very-verbose']
# We expand the... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | # ## GitHub
else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
r... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 156 | 196 | ||
nevir/groc:lib/cli.coffee:4:completion | completion | # ## GitHub
else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
r... | project.generate (error) ->
return callback error if error
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Roughly, the publishing script:
#
# 1. Switches to the `gh-pages` branch (creating it if necessary)
# 2. Copies the generate... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 93f867817d40a9a4546ba7fd59f6568c8990fa6c | 579 | https://github.com/nevir/groc/blob/93f867817d40a9a4546ba7fd59f6568c8990fa6c/lib/cli.coffee | 156 | 196 |
nevir/groc:lib/cli.coffee:1:raw_corpus | raw_corpus | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
# In keeping with our console beautification project, make sure that our output isn't getting
# too comfortable with th... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 6 | 55 | ||
nevir/groc:lib/cli.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
# In keeping with our console beautification project, make sure ... | var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, optionsConfig, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
// In keeping with our console beautification project, mak... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 6 | 55 |
nevir/groc:lib/cli.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, optionsConfig, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
// ... | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
# In keeping with our console beautification project, make sure that our output isn't getting
# too comfortable with th... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 6 | 55 |
nevir/groc:lib/cli.coffee:1:completion | completion | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
# In keeping with our console beautification project, make sure that our output isn't getting
# too comfortable with th... | Usage: groc [options] "lib/**/*.coffee" doc/*.md
groc accepts lists of files and (quoted) glob expressions to match the files you would like to
generate documentation for. Any unnamed options are shorthand for --glob arg.
You can also specify arguments via a configuration file in the current directory na... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 6 | 55 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.
utils.CLIHelpers.configureOptimist op... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 106 | 155 | ||
nevir/groc:lib/cli.coffee:3:completion | completion | console.log opts.help()
console.log
utils.Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.
utils.CLIHelpers.configureOptimist op... | # `--verbose` and `--very-verbose` just impact the logging level of the project.
project.log.minLevel = utils.Logger::LEVELS.DEBUG if argv.verbose
project.log.minLevel = utils.Logger::LEVELS.TRACE if argv['very-verbose']
# We expand the `--glob` expressions into a poor-man's set, so that we can easily remove
#... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
return callback... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 156 | 195 | ||
nevir/groc:lib/cli.coffee:4:completion | completion | else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
return callback... | return callback error if error
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Roughly, the publishing script:
#
# 1. Switches to the `gh-pages` branch (creating it if necessary)
# 2. Copies the generated docs from `.git/groc-tmp` over any... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | bb6323771b290e832dbcd3751edeb480540070fc | 579 | https://github.com/nevir/groc/blob/bb6323771b290e832dbcd3751edeb480540070fc/lib/cli.coffee | 156 | 195 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
return callback... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 49fcc7e3b3c202b4a09b278afc0aa1e24bcca0da | 579 | https://github.com/nevir/groc/blob/49fcc7e3b3c202b4a09b278afc0aa1e24bcca0da/lib/cli.coffee | 156 | 195 | ||
nevir/groc:lib/cli.coffee:4:completion | completion | else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
return callback... | return callback error if error
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Roughly, the publishing script:
#
# 1. Switches to the `gh-pages` branch (creating it if necessary)
# 2. Copies the generated docs from `.git/groc-tmp` over any... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 49fcc7e3b3c202b4a09b278afc0aa1e24bcca0da | 579 | https://github.com/nevir/groc/blob/49fcc7e3b3c202b4a09b278afc0aa1e24bcca0da/lib/cli.coffee | 156 | 195 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | console.log opts.help()
console.log
Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.
utils.CLIHelpers.configureOptimist opts, op... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 630999693b094a0443b06c78dcd5a50a610e5ddc | 579 | https://github.com/nevir/groc/blob/630999693b094a0443b06c78dcd5a50a610e5ddc/lib/cli.coffee | 106 | 155 | ||
nevir/groc:lib/cli.coffee:3:completion | completion | console.log opts.help()
console.log
Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.
utils.CLIHelpers.configureOptimist opts, op... | # `--verbose` and `--very-verbose` just impact the logging level of the project.
project.log.minLevel = Logger::LEVELS.DEBUG if argv.verbose
project.log.minLevel = Logger::LEVELS.TRACE if argv['very-verbose']
# We expand the `--glob` expressions into a poor-man's set, so that we can easily remove
# exclusions ... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 630999693b094a0443b06c78dcd5a50a610e5ddc | 579 | https://github.com/nevir/groc/blob/630999693b094a0443b06c78dcd5a50a610e5ddc/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | console.log opts.help()
console.log
Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.
utils.CLIHelpers.configureOptimist opts, op... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4ad028d2293f847dcd2728454a07845692f8e44b | 579 | https://github.com/nevir/groc/blob/4ad028d2293f847dcd2728454a07845692f8e44b/lib/cli.coffee | 106 | 155 | ||
nevir/groc:lib/cli.coffee:3:completion | completion | console.log opts.help()
console.log
Logger.error "Failed to load .groc.json: %s", err.message
return callback err
# We rely on [CLIHelpers.configureOptimist](utils/cli_helpers.html#configureoptimist) to provide
# the extra options behavior that we require.
utils.CLIHelpers.configureOptimist opts, op... | # `--verbose` and `--very-verbose` just impact the logging level of the project.
project.log.minLevel = Logger::LEVELS.DEBUG if argv.verbose
project.log.minLevel = Logger::LEVELS.TRACE if argv['very-verbose']
# We expand the `--glob` expressions into a poor-man's set, so that we can easily remove
# exclusions ... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4ad028d2293f847dcd2728454a07845692f8e44b | 579 | https://github.com/nevir/groc/blob/4ad028d2293f847dcd2728454a07845692f8e44b/lib/cli.coffee | 106 | 155 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
return callback... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | b59d6d264cb0158ec4a8c49593dbf5b1aacbe28d | 579 | https://github.com/nevir/groc/blob/b59d6d264cb0158ec4a8c49593dbf5b1aacbe28d/lib/cli.coffee | 156 | 195 | ||
nevir/groc:lib/cli.coffee:4:completion | completion | else
# We want to be able to annotate generated documentation with the project's GitHub URL. This is
# handy for things like generating links directly to each file's source.
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.message
return callback... | return callback error if error
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Roughly, the publishing script:
#
# 1. Switches to the `gh-pages` branch (creating it if necessary)
# 2. Copies the generated docs from `.git/groc-tmp` over any... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | b59d6d264cb0158ec4a8c49593dbf5b1aacbe28d | 579 | https://github.com/nevir/groc/blob/b59d6d264cb0158ec4a8c49593dbf5b1aacbe28d/lib/cli.coffee | 156 | 195 |
nevir/groc:lib/cli.coffee:1:raw_corpus | raw_corpus | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 10 | 59 | ||
nevir/groc:lib/cli.coffee:1:completion | completion | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | groc accepts lists of files and (quoted) glob expressions to match the files you would like to
generate documentation for.
You can also specify arguments via a configuration file in the current directory named
.groc.json. It should contain a mapping between (full) option names and their values. Search
... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 10 | 59 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | alias: 'gh'
)
.options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('i... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 60 | 109 | ||
nevir/groc:lib/cli.coffee:2:completion | completion | alias: 'gh'
)
.options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('i... | .options('strip',
describe: "A path prefix to strip when generating documentation paths (or --no-strip)."
alias: 's'
# * We want the default value of `--strip` to mirror the first directory given to us by the
# user. This ensures that the common case of `groc lib/` will map `lib/some/file.c... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 60 | 109 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | # And just for our sanity
argv.globs = argv._
return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behav... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 110 | 159 | ||
nevir/groc:lib/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# And just for our sanity
argv.globs = argv._
return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat thi... | // And just for our sanity
var config, configPath, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, m, project, ref, ref1, ref2, ref3, v,
indexOf = [].indexOf;
argv.globs = argv._;
if (argv.help) {
return console.log(opts.help());
}
// For the .groc.json configuration, we merge it into arg... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 110 | 159 |
nevir/groc:lib/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// And just for our sanity
var config, configPath, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, m, project, ref, ref1, ref2, ref3, v,
indexOf = [].indexOf;
argv.globs = argv._;
if (argv.help) {
return console.log(opts.help());
}
//... | # And just for our sanity
argv.globs = argv._
return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behav... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 110 | 159 |
nevir/groc:lib/cli.coffee:3:completion | completion | # And just for our sanity
argv.globs = argv._
return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behav... | # Squirrel the docs away inside our git directory if we're building for github pages
argv.out = path.join '.git', 'groc-tmp' if argv.github
# Find our matching files and stuff them into a poor-man's set.
files = {}
for globExpression in argv.globs
files[file] = true for file in glob.globSync globExpression... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 110 | 159 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | project.stripPrefixes = project.stripPrefixes.concat argv.strip
# We can generate w/o much fuss unless we're building for github
unless argv.github
project.generate (error) -> callback error
# ## GitHub
else
# Annotate the project with our remote github URL
utils.CLIHelpers.guessPrimaryGitHubURL ... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 160 | 194 | ||
nevir/groc:lib/cli.coffee:4:completion | completion | project.stripPrefixes = project.stripPrefixes.concat argv.strip
# We can generate w/o much fuss unless we're building for github
unless argv.github
project.generate (error) -> callback error
# ## GitHub
else
# Annotate the project with our remote github URL
utils.CLIHelpers.guessPrimaryGitHubURL ... | # Kick off project generation
project.generate (error) ->
return callback error if error
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5c5dfacd5b16797be06e2854fd26cf5ba775cf9d | 579 | https://github.com/nevir/groc/blob/5c5dfacd5b16797be06e2854fd26cf5ba775cf9d/lib/cli.coffee | 160 | 194 |
nevir/groc:lib/cli.coffee:1:raw_corpus | raw_corpus | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 8 | 57 | ||
nevir/groc:lib/cli.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In kee... | var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
actualCallback = callback;
callback = function(...args) {
// In kee... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
actualCallback = c... | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:1:completion | completion | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | groc accepts lists of files and (quoted) glob expressions to match the files you would like to
generate documentation for.
You can also specify arguments via a configuration file in the current directory named
.groc.json. It should contain a mapping between (full) option names and their values. Search
... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 58 | 107 | ||
nevir/groc:lib/cli.coffee:2:completion | completion | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | alias: 's'
# * We want the default value of `--strip` to mirror the first directory given to us by the
# user. This ensures that the common case of `groc lib/` will map `lib/some/file.coffee` to
# `doc/some/file.html`, and not a redundant and ugly path such as `doc/lib/some/file.html`.
de... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 58 | 107 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 108 | 157 | ||
nevir/groc:lib/cli.coffee:3:completion | completion | return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
... | # Find our matching files and stuff them into a poor-man's set.
files = {}
for globExpression in argv.globs
files[file] = true for file in glob.globSync globExpression
# Exclude any additional files
for globExpression in argv.except
delete files[file] for file in glob.globSync globExpression
files =... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | # We can generate w/o much fuss unless we're building for github
unless argv.github
project.generate (error) -> callback error
# ## GitHub
else
# Annotate the project with our remote github URL
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.messa... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 158 | 189 | ||
nevir/groc:lib/cli.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# We can generate w/o much fuss unless we're building for github
unless argv.github
project.generate (error) -> callback error
# ## GitHub
else
# Annotate the project with our remote github URL
utils.CLIHelpers.guessPrimaryGitHubURL (error, url... | // We can generate w/o much fuss unless we're building for github
if (!argv.github) {
project.generate(function(error) {
return callback(error);
});
} else {
// Annotate the project with our remote github URL
// ## GitHub
utils.CLIHelpers.guessPrimaryGitHubURL(function(error, url) {
if (error) {
... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 158 | 189 |
nevir/groc:lib/cli.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// We can generate w/o much fuss unless we're building for github
if (!argv.github) {
project.generate(function(error) {
return callback(error);
});
} else {
// Annotate the project with our remote github URL
// ## GitHub
utils.CLIHelpers.guessPrimary... | # We can generate w/o much fuss unless we're building for github
unless argv.github
project.generate (error) -> callback error
# ## GitHub
else
# Annotate the project with our remote github URL
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.messa... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 158 | 189 |
nevir/groc:lib/cli.coffee:4:completion | completion | # We can generate w/o much fuss unless we're building for github
unless argv.github
project.generate (error) -> callback error
# ## GitHub
else
# Annotate the project with our remote github URL
utils.CLIHelpers.guessPrimaryGitHubURL (error, url) ->
if error
project.log.error error.messa... | return callback error if error
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script
script = childProcess.spawn path.resolve(__dirname, '..', 'scri... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f | 579 | https://github.com/nevir/groc/blob/a7b2465c8cf959cce8a2b7b29cf26ecef8abcb4f/lib/cli.coffee | 158 | 189 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5aa7fbf6815c2c43b784c9d6595af4883e67d9b5 | 579 | https://github.com/nevir/groc/blob/5aa7fbf6815c2c43b784c9d6595af4883e67d9b5/lib/cli.coffee | 58 | 107 | ||
nevir/groc:lib/cli.coffee:2:completion | completion | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | alias: 's'
# * We want the default value of `--strip` to mirror the first directory given to us by the
# user. This ensures that the common case of `groc lib/` will map `lib/some/file.coffee` to
# `doc/some/file.html`, and not a redundant and ugly path such as `doc/lib/some/file.html`.
de... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5aa7fbf6815c2c43b784c9d6595af4883e67d9b5 | 579 | https://github.com/nevir/groc/blob/5aa7fbf6815c2c43b784c9d6595af4883e67d9b5/lib/cli.coffee | 58 | 107 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5aa7fbf6815c2c43b784c9d6595af4883e67d9b5 | 579 | https://github.com/nevir/groc/blob/5aa7fbf6815c2c43b784c9d6595af4883e67d9b5/lib/cli.coffee | 108 | 157 | ||
nevir/groc:lib/cli.coffee:3:completion | completion | return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
... | # Find our matching files and stuff them into a poor-man's set.
files = {}
for globExpression in argv.globs
files[file] = true for file in glob.globSync globExpression
# Exclude any additional files
for globExpression in argv.except
delete files[file] for file in glob.globSync globExpression
files =... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 5aa7fbf6815c2c43b784c9d6595af4883e67d9b5 | 579 | https://github.com/nevir/groc/blob/5aa7fbf6815c2c43b784c9d6595af4883e67d9b5/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | # ## Project Generation
project.generate (error) =>
return callback error if error or !argv.github
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script
script = ... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4945118095bb67f813fd1dd8c3406a8859c697ef | 579 | https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/cli.coffee | 158 | 175 | ||
nevir/groc:lib/cli.coffee:4:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# ## Project Generation
project.generate (error) =>
return callback error if error or !argv.github
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, ... | // ## Project Generation
project.generate((error) => {
var script;
if (error || !argv.github) {
return callback(error);
}
project.log.info('');
project.log.info('Publishing documentation to github...');
// Dealing with generation for github pages is a bit more involved, so we farm that out to a
// she... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 4945118095bb67f813fd1dd8c3406a8859c697ef | 579 | https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/cli.coffee | 158 | 175 |
nevir/groc:lib/cli.coffee:4:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// ## Project Generation
project.generate((error) => {
var script;
if (error || !argv.github) {
return callback(error);
}
project.log.info('');
project.log.info('Publishing documentation to github...');
// Dealing with generation for github pages is... | # ## Project Generation
project.generate (error) =>
return callback error if error or !argv.github
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script
script = ... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4945118095bb67f813fd1dd8c3406a8859c697ef | 579 | https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/cli.coffee | 158 | 175 |
nevir/groc:lib/cli.coffee:4:completion | completion | # ## Project Generation
project.generate (error) =>
return callback error if error or !argv.github
project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script | script = childProcess.spawn path.resolve(__dirname, '..', 'scripts', 'publish-git-pages')
script.stdout.on 'data', (data) -> project.log.info data.toString().trim()
script.stderr.on 'data', (data) -> project.log.error data.toString().trim()
script.on 'exit', (code) ->
return callback new Error 'Git... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4945118095bb67f813fd1dd8c3406a8859c697ef | 579 | https://github.com/nevir/groc/blob/4945118095bb67f813fd1dd8c3406a8859c697ef/lib/cli.coffee | 158 | 175 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 32eef7f01561b13473365594e60feaec5bc087d5 | 579 | https://github.com/nevir/groc/blob/32eef7f01561b13473365594e60feaec5bc087d5/lib/cli.coffee | 108 | 157 | ||
nevir/groc:lib/cli.coffee:3:completion | completion | return console.log opts.help() if argv.help
# For the .groc.json configuration, we merge it into argv in order to pick up default values such
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
... | # Find our matching files and stuff them into a poor-man's set.
files = {}
for globExpression in argv.globs
files[file] = true for file in glob.globSync globExpression
# Exclude any additional files
for globExpression in argv.except
delete files[file] for file in glob.globSync globExpression
files =... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 32eef7f01561b13473365594e60feaec5bc087d5 | 579 | https://github.com/nevir/groc/blob/32eef7f01561b13473365594e60feaec5bc087d5/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:1:raw_corpus | raw_corpus | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 8 | 57 | ||
nevir/groc:lib/cli.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In kee... | var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
actualCallback = callback;
callback = function(...args) {
// In kee... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
actualCallback = c... | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:1:completion | completion | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | groc accepts lists of files and (quoted) glob expressions to match the files you would like to
generate documentation for.
You can also specify arguments via a configuration file in the current directory named
.groc.json. It should contain a mapping between (full) option names and their values. Search
... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 58 | 107 | ||
nevir/groc:lib/cli.coffee:2:completion | completion | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | # * We want the default value of `--strip` to mirror the first directory given to us by the
# user. This ensures that the common case of `groc lib/` will map `lib/some/file.coffee` to
# `doc/some/file.html`, and not a redundant and ugly path such as `doc/lib/some/file.html`.
default: Utils.guessSt... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 58 | 107 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | # as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.groc.json'
argv[k] = v for k,v of config
# Special case, keep the strip prefix gu... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 108 | 157 | ||
nevir/groc:lib/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.groc.json'
argv[k] = v for k,v ... | // as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
// potential to change behavior in the future.
var config, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, m, project, ref, ref1, ref2, ref3, v,
indexOf = [].indexOf;
if (argv._.length === 0) {
t... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
// potential to change behavior in the future.
var config, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, m, project, ref, ref1, ref2, ref3, v,
... | # as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.groc.json'
argv[k] = v for k,v of config
# Special case, keep the strip prefix gu... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:3:completion | completion | # as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.groc.json'
argv[k] = v for k,v of config
# Special case, keep the strip prefix gu... | # Exclude any additional files
for globExpression in argv.except
delete files[file] for file in glob.globSync globExpression
files = (f for f of files)
# ## Project Configuration
project = new Project argv.root, argv.out
# Set up our logging configuration if the user cares about verbosity
project.lo... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:4:raw_corpus | raw_corpus | project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script
script = childProcess.spawn path.resolve(__dirname, '..', 'scripts', 'publish-git-pages')
script.stdout.on 'data',... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 158 | 172 | ||
nevir/groc:lib/cli.coffee:4:completion | completion | project.log.info ''
project.log.info 'Publishing documentation to github...'
# Dealing with generation for github pages is a bit more involved, so we farm that out to a
# shell script
script = childProcess.spawn path.resolve(__dirname, '..', 'scripts', 'publish-git-pages') | script.stdout.on 'data', (data) -> project.log.info data.toString().trim()
script.stderr.on 'data', (data) -> project.log.error data.toString().trim()
script.on 'exit', (code) ->
return callback new Error 'Git publish failed' if code != 0
callback() | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 4f8226ab892abdfb28634f0951c1f9539c028a0a | 579 | https://github.com/nevir/groc/blob/4f8226ab892abdfb28634f0951c1f9539c028a0a/lib/cli.coffee | 158 | 172 |
nevir/groc:lib/cli.coffee:1:raw_corpus | raw_corpus | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 8 | 57 | ||
nevir/groc:lib/cli.coffee:1:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In kee... | var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
actualCallback = callback;
callback = function(...args) {
// In kee... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:1:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var CLI;
CLI = function(inputArgs, callback) {
var actualCallback, opts;
// As such, we don't want our output bumping up against the shell execution lines and blurring
// together; use that whitespace with great gusto!
console.log('');
actualCallback = c... | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:1:completion | completion | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | lidoc accepts lists of files and (quoted) glob expressions to match the files you would like to
generate documentation for.
You can also specify arguments via a configuration file in the current directory named
.lidoc.json. It should contain a mapping between (full) option names and their values. Search
... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 58 | 107 | ||
nevir/groc:lib/cli.coffee:2:completion | completion | .options('out',
describe: "The directory to place generated documentation, relative to the project root."
alias: 'o'
default: 'doc'
)
.options('except'
describe: "Glob expression of files to exclude. Can be specified multiple times."
)
.options('index',
describe: "Th... | # * We want the default value of `--strip` to mirror the first directory given to us by the
# user. This ensures that the common case of `lidoc lib/` will map `lib/some/file.coffee` to
# `doc/some/file.html`, and not a redundant and ugly path such as `doc/lib/some/file.html`.
default: Utils.guessS... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 58 | 107 |
nevir/groc:lib/cli.coffee:3:raw_corpus | raw_corpus | # as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.lidoc.json'
argv[k] = v for k,v of config
# Special case, keep the strip prefix g... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 108 | 157 | ||
nevir/groc:lib/cli.coffee:3:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
# as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.lidoc.json'
argv[k] = v for k,v... | // as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
// potential to change behavior in the future.
var config, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, m, project, ref, ref1, ref2, ref3, v,
indexOf = [].indexOf;
if (argv._.length === 0) {
t... | CoffeeScript | JavaScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:3:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
// as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
// potential to change behavior in the future.
var config, err, f, file, files, globExpression, i, j, k, l, len, len1, len2, len3, m, project, ref, ref1, ref2, ref3, v,
... | # as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.lidoc.json'
argv[k] = v for k,v of config
# Special case, keep the strip prefix g... | JavaScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:3:completion | completion | # as the root mapping to `process.cwd()`. Please don't treat this as a contract; it has the
# potential to change behavior in the future.
if argv._.length == 0
try
config = require path.resolve process.cwd(), '.lidoc.json'
argv[k] = v for k,v of config
# Special case, keep the strip prefix g... | # Exclude any additional files
for globExpression in argv.except
delete files[file] for file in glob.globSync globExpression
files = (f for f of files)
# ## Project Configuration
project = new Project argv.root, argv.out
# Set up our logging configuration if the user cares about verbosity
project.lo... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | ccaeb7be8ab0ec2321d8bab84e1071d494a509b6 | 579 | https://github.com/nevir/groc/blob/ccaeb7be8ab0ec2321d8bab84e1071d494a509b6/lib/cli.coffee | 108 | 157 |
nevir/groc:lib/cli.coffee:1:raw_corpus | raw_corpus | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 291b1ecf56d55b5aa565e08645b67e5e1a3d4d73 | 579 | https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/cli.coffee | 8 | 57 | ||
nevir/groc:lib/cli.coffee:1:completion | completion | CLI = (inputArgs, callback) ->
# As such, we don't want our output bumping up against the shell execution lines and blurring
# together; use that whitespace with great gusto!
console.log ''
actualCallback = callback
callback = (args...) ->
# In keeping with our console beautification project, make sure t... | .lidoc.json. It should contain a mapping between (full) option names and their values. Search
paths (the positional arguments) should be set via the key "_". For example:
{ "_": ["lib", "vendor"], out: "documentation", strip: [] }
Run lidoc without arguments to use the configuration file.
""")
... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 291b1ecf56d55b5aa565e08645b67e5e1a3d4d73 | 579 | https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/cli.coffee | 8 | 57 |
nevir/groc:lib/cli.coffee:2:raw_corpus | raw_corpus | default: 'doc'
)
.options('index',
describe: "The file to use as the index of the generated documentation."
alias: 'i'
)
.options('root',
describe: "The root directory of the project."
alias: 'r'
default: process.cwd()
)
.options('strip',
describe: ... | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 291b1ecf56d55b5aa565e08645b67e5e1a3d4d73 | 579 | https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/cli.coffee | 58 | 107 | ||
nevir/groc:lib/cli.coffee:2:completion | completion | default: 'doc'
)
.options('index',
describe: "The file to use as the index of the generated documentation."
alias: 'i'
)
.options('root',
describe: "The root directory of the project."
alias: 'r'
default: process.cwd()
)
.options('strip',
describe: ... | )
.options('very-verbose',
describe: "Hey, you asked for it."
)
argv = opts.argv
# * There also does not be a way to enforce that a particular option is an array, so we do this
# coercion ourselves.
argv.strip = [argv.strip] unless util.isArray argv.strip
return console.log opts.help() if a... | CoffeeScript | CoffeeScript | nevir/groc | lib/cli.coffee | MIT | 291b1ecf56d55b5aa565e08645b67e5e1a3d4d73 | 579 | https://github.com/nevir/groc/blob/291b1ecf56d55b5aa565e08645b67e5e1a3d4d73/lib/cli.coffee | 58 | 107 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.