144 Commits

Author SHA1 Message Date
Tom MacWright
b465902fa2 Add support for example captions
Fixes #110
2016-02-14 18:41:36 -05:00
Tom MacWright
46b9b6543c Remove ast-types dependency 2016-02-14 17:59:37 -05:00
Tom MacWright
70fbdedf0c Babel 6 upgrade, round 2 2016-02-14 13:15:54 -05:00
Tom MacWright
a15e1c5fe2 Update for new highlight.js 2016-01-24 11:26:05 -05:00
Titus Wormer
35e17be4e4 Rename mdast to remark
Note that the AST now carries the name “mdast”, meaning
utilities (such as mdast-util-inject) keep their name.

This name-change includes the `mdast` formatter, which also changed
to `remark`.

Additionally:

* Update relating packages.
* Fix a bug where `text` nodes without value were
  [generated](6b905aefb1/lib/output/markdown_ast.js (L144)).
2016-01-24 10:35:51 -05:00
Anton Lavrenov
e1f6912e8a fix lint errors 2016-01-15 11:41:19 +08:00
Anton Lavrenov
cddc09d996 fix empty example error. add lint rule. 2016-01-15 11:31:59 +08:00
Daniel Tschinder
0853c57dda Add support for flow boolean literal type 2016-01-06 15:43:22 +01:00
Markus Hsi-Yang Fritz
f14fff41b9 Add support for Flow literal string/number types 2016-01-05 12:24:08 +01:00
Tom MacWright
34b647fa4a Ban and fix trailing spaces. 2016-01-03 17:02:25 -05:00
Charlie Brown
52ba97b7f1 Correct js lint errors 2015-12-30 13:30:54 -06:00
Charlie Brown
7f7784ced3 Support revealing module pattern 2015-12-30 12:48:48 -06:00
Anand Thakker
bdd1f539fc Exit nonzero from readme cmd if section is absent 2015-12-13 22:18:33 -05:00
Anand Thakker
3ea2944ebc Add readme command and tests 2015-12-13 15:33:35 -05:00
Tom MacWright
8a6cac82d1 Add --access flag. Fixes #262 2015-12-12 17:09:43 -05:00
Tom MacWright
5ef597b2ee Combine default parameters into types. Fixes #290 2015-12-10 17:45:59 -05:00
Tom MacWright
71f778bcb1 Simplify destructuring types 2015-12-10 16:55:02 -05:00
Tom MacWright
4b252ebf00 Avoid traversal where possible. Fixes #293 2015-12-10 16:11:44 -05:00
Tom MacWright
71a52e5ed1 Support membership inference in class expressions. Fixes #284 2015-12-07 18:37:26 -05:00
Tom MacWright
bb9fc5f8e5 Infer augments tag from extends keyword. Fixes #195 2015-12-07 18:17:05 -05:00
Tom MacWright
931f48eefc Implement five tags:
- version
- author
- license
- copyright
- since

These are flattened and output in Markdown. HTML output will
require an update in the theme module
2015-12-07 17:53:00 -05:00
Tom MacWright
8e0f960db0 Move type formatting helper to utils package 2015-12-07 16:26:14 -05:00
John Firebaugh
0a1de4f343 Theme API 2.0 2015-12-07 16:09:24 -05:00
Tom MacWright
b756c0ce58 Support alias tag. Refs #9 2015-12-07 13:04:01 -05:00
Tom MacWright
73d6118e1c Implement all doctrine-emitted types. Fixes #249 2015-12-07 12:44:15 -05:00
Anand Thakker
571137a77d Merge pull request #277 from documentationjs/refactor-commands-new
Refactor commands into modules
2015-12-06 21:28:11 -05:00
Tom MacWright
a6f0435bfe Fix coverage of array destructuring 2015-12-06 19:57:14 -05:00
Tom MacWright
1d1aba82ab Improve parameter inference for destructuring and defaults
Fixes #271
2015-12-06 19:29:04 -05:00
Anand Thakker
b609664ed8 Add another note about command modules 2015-12-06 18:39:28 -05:00
Anand Thakker
0022934d90 Fix lint errors 2015-12-06 18:16:41 -05:00
Anand Thakker
e492be67d1 Add some comments re: command plugins 2015-12-06 18:13:17 -05:00
Anand Thakker
5c8459d957 Reorganize argument parsing
Arg parsing is now split into common options (in bin/documentation.js)
and command-specific options (in each command module, exported as
parseArgs).

This includes moving `--private` and `--github` to the common args
instead of having them under the build/serve commands.  Reason: these
two args are options understood by the main module, as opposed to args
like `--format` which are only understood by the actual output piece
in build/serve.

Also removes `args.js`, which had previously exported the argument
parsing for use in situations like documentation-readme.  The need
for this, I think, is largely made irrelevant in the face of slightly
generalizing the CLI to use commands.
2015-12-06 18:13:17 -05:00
Anand Thakker
795d1e3794 Refactor commands to separate modules 2015-12-06 18:12:19 -05:00
Tom MacWright
bcc4b2c6b2 Enforce semi: 2 2015-12-06 18:01:55 -05:00
Tom MacWright
d069b6a40b Support new node versions, including v4 and v5
* Compare strings as lowercase, to permit for v4+ compatibility
* Fix bad reference to loc.name
* Update README badge and fixture
* Remove brfs dependency
* Remove traverse
* Remove browser transform support
2015-12-01 15:34:50 -05:00
Tom MacWright
d470b54213 Correctly interpret name tag. Fixes #205 2015-11-28 11:50:29 -05:00
Tom MacWright
6b8cc62eef Trim later to protect against sha HEAD files with newlines 2015-11-28 10:53:31 -05:00
Tom MacWright
7084147d51 Fix and test detached url prefixes. Fixes #251 2015-11-25 15:00:39 -05:00
Tom MacWright
57b2452353 Use setColor to produce more readable colors
Fixes #258
2015-11-25 14:39:15 -05:00
Tom MacWright
8fd36f986a Fix and cover bug in walk, make highlighting functional 2015-11-25 14:19:55 -05:00
Iilei
ebcee3ae07 Pass though hljs options: Enable hljs highlightAuto and languages
By providing a hljs object within the configuration, `@example` tags in
a variety of languages are parsed properly.
2015-11-25 17:31:58 +01:00
Tom MacWright
cd0e8143db Simplify extension check, add coverage 2015-11-24 13:00:32 -05:00
Kevin Wenner
356616ea1e Add an extension option
This new option change the previous behavior of parsing every input files
from module-deps except json. But if one use browserify to require json file
they may require other file types that cant be supported by documentationjs,
the new behaviour is to parse files whose extension match one in a whitelist
2015-11-24 12:35:16 -05:00
kketch
c1962457c9 add an external option
add an external option for the cli and permit the use of multiple patterns / globs
in an array. Use micromatch.any() instead of micromatch.matcher()
2015-11-24 12:18:48 -05:00
Tom MacWright
fe82dde727 Fix HTML validity with default template 2015-11-24 11:35:17 -05:00
Tom MacWright
50aaf9d35b --watch and --serve flags
These new flags replace the functionality of
dev-documentation
2015-11-24 11:21:11 -05:00
Tom MacWright
432151bce8 Fix nullable type support. Fixes #245 2015-11-17 11:12:42 -05:00
Lucas Wojciechowski
a8581b41e7 Fix exception when formatting lint errors 2015-11-11 09:35:00 -05:00
Tom MacWright
463bb4e62f Improve test coverage 2015-11-09 13:08:56 -05:00
Tom MacWright
33552c6e8a Fix type merging. Fixes #233
Some params cannot be identified with only param.name. This
changes the algorithm to transform parameters into doc objects
first, and then using the value of doc.name, which is defined
even for parameters with default values.
2015-11-09 12:51:15 -05:00