Skip to content

Commit

Permalink
Bump version 0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rottmann committed Dec 18, 2014
1 parent e623300 commit 47f0ec2
Show file tree
Hide file tree
Showing 114 changed files with 383 additions and 8,158 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.settings/
.project
doc/
node_modules/
tmp/
doc/
.idea/
npm-debug.log
10 changes: 6 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.settings/
.project
.git/
node_modules/
test/
tmp/
doc/
.idea/
.gitignore
.npmignore
.travis.yml
npm-debug.log
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# apiDoc Changelog


#### 0.10.0

* __Split apidoc code__
* [apidoc](https://github.com/apidoc/apidoc) is now only the CLI-Tool with UI-Template and file creation (as you know it).
You can use apidoc without change anything.

* [apidoc-core](https://github.com/apidoc/apidoc-core) (for developers) is the parser and response the api-data.

* [apidoc-example](https://github.com/apidoc/apidoc-example) (for developers) are the test files for the [apidoc-spec](https://github.com/apidoc/apidoc-spec).

* CLI
* Replace optimist (not maintained anymore) with nomnom:
true / false parameters can now be used, e.g. enable markdown (default) `--markdown` or disable `--no-markdown`.
* Add parameter `--markdown`.
* Replace the custom Logger with [winston](https://github.com/flatiron/winston).

* Parser
* Bugfix: Settings to enable / disable markdown (marked-gfm was previously used).

* Template
* Add generator.url and generator.name to the footer generator information (for custom ui-generators).
* Move handlebars_helper.js to utils/

* Common
* Remove grunt dependencies (test run with `npm run test`).
* Change grunt-apidoc (0.10.0) to use always the latest version of apiDoc.


#### 0.9.1

* Parser
Expand Down
88 changes: 0 additions & 88 deletions Gruntfile.js

This file was deleted.

22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2013-2014 inveris OHG
Author Peter Rottmann <[email protected]>
Licensed under the MIT license.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

22 changes: 0 additions & 22 deletions LICENSE.md

This file was deleted.

11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# apiDoc 0.9.x
# apiDoc 0.10.x

Generates a RESTful web API Documentation.

Expand Down Expand Up @@ -124,12 +124,3 @@ Pull requests are welcome too!
A chat about apiDoc is on [Gitter](https://gitter.im/apidoc/talk).

[![Gitter chat](https://badges.gitter.im/apidoc/talk.png)](https://gitter.im/apidoc/talk)


## License

Copyright (c) 2013-2014 inveris OHG

Author Peter Rottmann <[email protected]>

Licensed under the MIT license.
132 changes: 65 additions & 67 deletions bin/apidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,77 +11,73 @@
* Licensed under the MIT license.
*/

var path = require('path');
var optimist = require('optimist');
var path = require('path');
var nomnom = require('nomnom');
var apidoc = require('../lib/index');

var argv = optimist
.usage('Usage: $0 [options]')
var argv = nomnom
.option('file-filters', { abbr: 'f', 'default': '.*\\.(coffee|cs|dart|erl|go|java|js|php?|py|rb|ts|pm)$',
help: 'RegEx-Filter to select files that should be parsed (multiple -f can be used).' })

.option('f', { alias: 'file-filters', 'default': '.*\\.(coffee|cs|dart|erl|go|java|js|php?|py|rb|ts|pm)$',
describe: 'RegEx-Filter to select files that should be parsed (multiple -f can be used).' })
.option('exclude-filters', { abbr: 'e', 'default': '',
help: 'RegEx-Filter to select files / dirs that should not be parsed (many -e can be used).', })

.option('e', { alias: 'exclude-filters', 'default': '',
describe: 'RegEx-Filter to select files / dirs that should not be parsed (many -e can be used).', })
.option('input', { abbr: 'i', 'default': './', help: 'Input / source dirname.' })

.option('i', { alias: 'input', 'default': './', describe: 'Input / source dirname.' })
.option('output', { abbr: 'o', 'default': './doc/', help: 'Output dirname.' })

.option('o', { alias: 'output', 'default': './doc/', describe: 'Output dirname.' })
.option('template', { abbr: 't', 'default': path.join(__dirname, '../template/'),
help: 'Use template for output files.' })

.option('t', { alias: 'template', 'default': path.join(__dirname, '../template/'),
describe: 'Use template for output files.' })
.option('verbose', { abbr: 'v', flag: true, 'default': false, help: 'Verbose debug output.' })

.option('v', { alias: 'verbose', boolean: true, 'default': false, describe: 'Verbose debug output.' })
.option('help', { abbr: 'h', flag: true, help: 'Show this help information.' })

.option('h', { alias: 'help', boolean: true, describe: 'Show this help information.' })
.option('debug', { flag: true, 'default': false, help: 'Show debug messages.' })

.option('debug', { boolean: true, 'default': false, describe: 'Show debug messages.' })
.option('color', { flag: true, 'default': true, help: 'Turn off log color.' })

.option('no-color', { boolean: true, 'default': false, describe: 'Turn off log color.' })
.option('parse', { flag: true, 'default': false,
help: 'Parse only the files and return the data, no file creation.' })

.option('parse', { boolean: true, 'default': false,
describe: 'Parse only the files and return the data, no file creation.' })
.option('parse-filters', { help: 'Optional user defined filters. Format name=filename' })
.option('parse-parsers', { help: 'Optional user defined parsers. Format name=filename' })
.option('parse-workers', { help: 'Optional user defined workers. Format name=filename' })

.option('parse-filters', { describe: 'Optional user defined filters. Format name=filename' })
.option('parse-parsers', { describe: 'Optional user defined parsers. Format name=filename' })
.option('parse-workers', { describe: 'Optional user defined workers. Format name=filename' })
.option('silent', { flag: true, 'default': false, help: 'Turn all output off.' })

.option('silent', { boolean: true, 'default': false, describe: 'Turn all output off.' })

.option('simulate', { boolean: true, 'default': false, describe: 'Execute but not write any file.' })
.option('simulate', { flag: true, 'default': false, help: 'Execute but not write any file.' })

// markdown settings
.option('markdown', { flag: true, 'default': true, help: 'Turn off markdown parser.' })

.option('marked-config', { 'default': '',
describe: 'Enable custom markdown parser configs. It will overwite all other marked settings.' })
help: 'Enable custom markdown parser configs. It will overwite all other marked settings.' })

.option('marked-gfm', { boolean: true, 'default': true,
describe: 'Enable GitHub flavored markdown.' })
.option('marked-gfm', { flag: true, 'default': true,
help: 'Enable GitHub flavored markdown.' })

.option('marked-tables', { boolean: true, 'default': true,
describe: 'Enable GFM tables. This option requires the gfm option to be true.' })
.option('marked-tables', { flag: true, 'default': true,
help: 'Enable GFM tables. This option requires the gfm option to be true.' })

.option('marked-breaks', { boolean: true, 'default': false,
describe: 'Enable GFM line breaks. This option requires the gfm option to be true.' })
.option('marked-breaks', { flag: true, 'default': false,
help: 'Enable GFM line breaks. This option requires the gfm option to be true.' })

.option('marked-pedantic', { boolean: true, 'default': false,
describe: 'Conform to obscure parts of markdown.pl as much as possible.' })
.option('marked-pedantic', { flag: true, 'default': false,
help: 'Conform to obscure parts of markdown.pl as much as possible.' })

.option('marked-sanitize', { boolean: true, 'default': false,
describe: 'Sanitize the output. Ignore any HTML that has been input.' })
.option('marked-sanitize', { flag: true, 'default': false,
help: 'Sanitize the output. Ignore any HTML that has been input.' })

.option('marked-smartLists', { boolean: true, 'default': false,
describe: 'Use smarter list behavior than the original markdown.' })
.option('marked-smartLists', { flag: true, 'default': false,
help: 'Use smarter list behavior than the original markdown.' })

.option('marked-smartypants', { boolean: true, 'default': false,
describe: 'Use \'smart\' typograhic punctuation for things like quotes and dashes.' })
.option('marked-smartypants', { flag: true, 'default': false,
help: 'Use \'smart\' typograhic punctuation for things like quotes and dashes.' })

.argv
.parse()
;

if (argv.help) {
optimist.showHelp();
process.exit(0);
}

/**
* Transform parameters to object
*
Expand Down Expand Up @@ -117,34 +113,36 @@ function resolveMarkdownOptions(argv) {
return require(path.resolve(argv['marked-config']));
} else {
return {
gfm: argv['marked-gfm'],
tables: argv['marked-tables'],
breaks: argv['marked-breaks'],
pedantic: argv['marked-pedantic'],
sanitize: argv['marked-sanitize'],
smartLists: argv['marked-smartLists'],
gfm : argv['marked-gfm'],
tables : argv['marked-tables'],
breaks : argv['marked-breaks'],
pedantic : argv['marked-pedantic'],
sanitize : argv['marked-sanitize'],
smartLists : argv['marked-smartLists'],
smartypants: argv['marked-smartypants']
};
}
}

var defaults = {
var options = {
excludeFilters: argv['exclude-filters'],
includeFilters: argv['file-filters'],
src: argv['input'],
dest: argv['output'],
template: argv['template'],
verbose: argv['debug'] === true ? argv['debug'] : argv['verbose'],
debug: argv['debug'],
parse: argv['parse'],
filters: transformToObject(argv['parse-filters']),
parsers: transformToObject(argv['parse-parsers']),
workers: transformToObject(argv['parse-workers']),
silent: argv['silent'],
simulate: argv['simulate'],
marked: resolveMarkdownOptions(argv)
src : argv['input'],
dest : argv['output'],
template : argv['template'],
verbose : argv['verbose'],
debug : argv['debug'],
parse : argv['parse'],
colorize : argv['color'],
filters : transformToObject(argv['parse-filters']),
parsers : transformToObject(argv['parse-parsers']),
workers : transformToObject(argv['parse-workers']),
silent : argv['silent'],
simulate : argv['simulate'],
markdown : argv['markdown'],
marked : resolveMarkdownOptions(argv)
};

try {
require('../lib/apidoc')(defaults);
} catch (e) {}
if (apidoc.createDoc(options) === false) {
process.exit(1);
}
Loading

0 comments on commit 47f0ec2

Please sign in to comment.