67 Commits

Author SHA1 Message Date
Tom MacWright
c3aaa86dc2
refactor: remove flow and related dependencies, test on 10 not latest, skip slow tests 2018-12-09 16:56:56 -08:00
Anton Shchekota
7d74060caf Eslint add new rules - no-var and prefer-const 2018-01-24 14:10:41 +03:00
Hugo Josefson
7e0127819a Fix args regression: readme --shallow --format (Invalid second argument) (#968)
* Add shared_options to readme command.

This makes --shallow and --format work again.

* Update yarn.lock based on package.json.

* Move readme example to where it works,

remove superfluous usage string.

yargs@>=7 throws exceptions on incorrectly structured builder objects.

* Update expected readme test fixture.

* Update bin-readme snapshot.

* s/_.assign/Object.assign/g thanks to node@>=4.

* Update yarn.lock based on package.json (lint-staged@6)

* Override flow error message.
2017-12-10 15:04:32 +03:00
Anton Shchekota
227db1c9ee chore: updated yargs Fixed #836 2017-09-29 18:50:38 +03:00
Tom MacWright
11d9045a00 Native Flow, use Jest (#767)
* build: Use Flow syntax without comments.

We're switching to Flow annotations - not Flow comments. This
gives documentation.js the ability to self-document without
JSDoc types and improves our compatibility with tools like
prettier.

Fixes #729. Fixes #709
2017-05-08 20:46:21 -04:00
Tom MacWright
7f7ea0837c style(prettier): Include declarations, bin, and default_theme in prettier scope (#747)
This ensures all our formatting everywhere is consistent
2017-04-21 19:04:11 -04:00
Tom MacWright
631c6925d4 feat(core): Switch to Promises everywhere. Adopt Node v4 ES6 (#648)
* feat(core): Switch to Promises everywhere. Adopt Node v4 ES6

Big changes:

* Uses template strings where appropriate
* Config and argument parsing is unified and there is no such thing
  as formatterOptions anymore. All user-passed options go through
  mergeConfig.
* The node API surface changed (again): `buildSync` is removed,
  building operations return Promises.
* Now using Flow for internal type annotations.

More changes:

* Remove buildSync command
* feat(inference): Partially implement object shorthand support
* Refs #649
* Use Flow annotations to  enforce types
* Keep flow but switch to comment syntax
* Clarify types
* More flow improvements
* Turn server into class
* LinkerStack becomes class too
* Fix comment description type
* Run flow on lint
* Many more flow fixes
* More intense flow refactoring
* Simplify inference steps
* Update inference tests, flow errors down to 1
* Continue refining types
* Fix more flow issues
* Use 'use strict' everywhere
* Make 'ast' property configurable
* Fix many tests
* Fix more tests
* Fix more tests
* Fix augments
* Test Markdown meta support
* Improve test coverage
* Switch back from for of to for for speed
2017-01-27 16:14:19 -05:00
Tom MacWright
88c8f9a668 fix(cli): Fix error reporting in the CLI 2016-12-28 22:25:45 -05:00
Tom MacWright
5bfc660a98 test(coverage): Improve test coverage of document exported 2016-12-28 22:25:45 -05:00
Tom MacWright
ab16a20872 fix(bin): Remove dead code in documentation.js command (#627) 2016-12-07 17:29:06 -05:00
Tom MacWright
5c3b6baa7a docs(cli): Improve selection of examples that the CLI tool lists 2016-12-01 14:09:41 -05:00
Tom MacWright
df8efa4d3d Update dependencies (#560)
* also deprecated --private option in favor of --access
2016-10-10 17:16:31 -04:00
Tom MacWright
7696e965ca Reorganize server code into lib/serve 2016-06-17 16:07:49 -04:00
Tom MacWright
c8ad087308 Refactor CLI parsing 2016-03-19 12:22:03 -04:00
Tom MacWright
5a5ebaf763 Unkink option parsing options 2016-03-18 17:11:11 -04:00
Anand Thakker
34eda223b2 Fix command help 2015-12-13 13:45:17 -05:00
Tom MacWright
8a6cac82d1 Add --access flag. Fixes #262 2015-12-12 17:09:43 -05:00
Anand Thakker
ea25fadea6 CLI fail gracefully on unknown command 2015-12-09 07:04:23 -05:00
Anand Thakker
0022934d90 Fix lint errors 2015-12-06 18:16:41 -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
50aaf9d35b --watch and --serve flags
These new flags replace the functionality of
dev-documentation
2015-11-24 11:21:11 -05:00
Tom MacWright
844f4b73bb Use vfile-reporter to format error output 2015-10-25 20:39:28 -04:00
John Firebaugh
e67b5d2f55 Use walk where appropriate 2015-10-13 16:15:44 -07:00
Tom MacWright
b3c990db1f Simpler and stricter eslint 2015-10-06 20:31:50 -04:00
Tom MacWright
d7f06fa5c4 Store commentLineNumber on errors. Fixes #159
cc @jfirebaugh for the review
2015-10-06 16:23:22 -04:00
Tom MacWright
0aa42d294f Enable and fix no-unused-vars rule 2015-10-06 15:28:32 -04:00
Tom MacWright
bd0d0705f6 💯 2015-10-04 12:08:49 -04:00
Anand Thakker
ea4116fed1 Pull additional parsing & validation into args.js 2015-10-04 10:26:57 -04:00
Tom MacWright
a848202dcf Simplify error parsing by attaching errors to comments 2015-10-01 20:41:50 -04:00
Tom MacWright
b4764e15de Use options 2015-09-30 14:02:30 -04:00
Tom MacWright
42babf7c03 Refactor arg parser out of binary 2015-09-30 13:55:47 -04:00
Tom MacWright
c24a9b88a4 Enable jsdoc rule and enforce it.
Also:

* Moves reduction out of parsers so that they don't have awkward
  function signatures
2015-09-28 20:36:07 -04:00
Tom MacWright
717b0fde18 Simplify lint API 2015-09-27 18:00:12 -04:00
Tom MacWright
de0e3cc662 Make github search sync 2015-09-27 17:54:36 -04:00
Tom MacWright
a383a045e2 Fix tests 2015-09-27 12:46:09 -04:00
Tom MacWright
92a6261f2a Deep in the weeds of refactoring hierarchies 2015-07-25 16:10:16 -04:00
Tom MacWright
183ab7547e Merge branch 'master' into rclark-sorting 2015-07-24 15:51:48 -04:00
Tom MacWright
3d88355100 Better error when templates aren't found. Fixes #124 2015-07-21 17:09:10 -04:00
Tom MacWright
ba5c0d6823 Expose theme option to cli as -t or --theme 2015-07-10 15:50:16 -04:00
Anand Thakker
29020035cb Expose --shallow option in cli. 2015-07-01 14:02:05 -04:00
Ryan Clark
6731c8b516 user-defined sorting via config file 2015-06-19 16:41:52 -07:00
Tom MacWright
8883fa371b Remove docset and its sqlite dependency
Remove other dependencies only used by docset

Remove docset support from README. Fixes #61
2015-06-16 14:09:12 -04:00
Tom MacWright
d6efba442b Fix name & version without package 2015-06-05 17:41:35 -04:00
Tom MacWright
9f3bc54ce0 Add polyglot stream: sidesteps module-deps, uses get-comments 2015-05-27 11:27:21 -04:00
Tom MacWright
cc63b8d022 Support transforms. Fixes #3 2015-05-06 18:09:19 -04:00
Tom MacWright
6fc10ed9b8 Reorganize formats, refactor formats 2015-04-09 15:29:50 -07:00
Tom MacWright
bf050fb827 Graduate access and flattening to the default 2015-04-09 15:15:39 -07:00
Tom MacWright
8a57d43bd5 Improve style, add internal docs 2015-04-09 14:37:54 -07:00
Tom MacWright
63340b415a Lazy-initialize formatters 2015-04-09 11:45:16 -07:00