* refactor: list all commands in commands.json
This also changes the order of commands in the docs, due to how I changed
the doc-generating script.
* fix lint error and alphabetize command list
Prefer the `files` attribute over `.npmignore` to minimize the bytes users
download when installing ShellJS. This cuts the size down from ~1.8M to ~1.2M.
* test: set up ava and move cd.js
Set up ava as the new test framework. Migrate the tests for the cd command to
use the ava framework.
* refactor: reorder imports, remove useless dep
If an error exists, but has no error code, it defaults to 1 (a common code for
most Unix commands). Tests have been omitted since this is an edge case that is
difficult to reproduce.
Fixes#536
* fix: maxdepth doesn't limit total number of copies
Prevent maxdepth from limiting the total number of copies, only allow it to
limit the maximum depth
Fixes#547
* refactor: make `depth` be its own argument
* Get pipe tests running on Windows.
I used the FIND command which ships with Windows as something to
pass data through.
The test checks that a POSIX-like find(1) exists and skips the tests
if this condition is true because Windows-provided FIND is incompatible
with find(1).
* Remove obvious comments.
Requested by @nfischer. I removed both the unix-specific and Windows
specific comments because I figure they both fall under being too
obvious based on being in the process.platform conditional.
* Make FIND usage cleaner and document it.
* Use shx grep to make pipe tests portable.
Discussed in #550. To test piping and its interaction with
real processes, a shellout is necessary. But on Windows,
you cannot rely on utilities like grep(1) being around.
Using shx, we can write portable code. Otherwise, the
tests have to be conditional on the platform and be
way more complicated.