No change in logic.
Add `/* istanbul ignore next */` lines for hard-to-test lines so that
they don't count against us during code coverage.
I've also adjusted comments that I found confusing, and changed some
formatting.
Partial fix for #671
- Add @freitagbr to the bottom of the README
- Remove docs about shjs (it's not well supported)
- Remove docs about coffeescript (we don't do anything special for
coffeescript anyway)
- Modify the section about shelljs/global, since we strongly recommend
avoiding this now
- Rewrite the code example to use `require('shelljs')` instead of
shelljs/global
- Mention ESLint next to JSHint
- Reformat sections with long lines to be 80 columns
WebPack has issues with importing JSON directly and using JavaScript
methods on it. For this reason, using the `.forEach()` method on the
imported JSON array caused a method-not-found error.
Instead, we can make this a real JavaScript array by keeping it in a
JavaScript file and exporting it as a field.
It should be noted that exporting it as `exports = [...]` does not work,
because Node won't actually interpret it as a JavaScript array (with
the required methods). So instead we can export it as
`exports.list = [...]` and access the `list` field to get the real
JavaScript array of command names.
Fixes#667
* feat: -L (follow symlinks) option for ls
* test: ls -L option
* docs: Add ls -L option to readme
* fix: ls -L ternary operator
* Revert "test: ls -L option"
This reverts commit dbb057ac087b23aa2c1358018d3c832dd546c5f2.
* test: ls -L option
* test: Remove duplicate test
* feature: add -a option for which command
* chore(test): test which -a with unexisting name
* chore(test): check which -a has same result as regular one
* chord(test): fix errors mentioned by eslint
Adds tests to make sure that non-normalized paths (i.e. path/to/./dir) are
valid for a few commands, including mkdir() which previously failed when given
the -p flag.
Fixes#634
* 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.