No change to logic. This checks for stale README in the unit tests
instead of by calling 'gendocs' directly.
The main goal is for GitHub CI to stop getting tripped up by
package-lock.json formatting changes. `npm install` sometimes overwrites
the package-lock file with a new format, and this breaks the
after-travis step.
Test: node_modules/.bin/ava test/docs.js
The gendocs script no longer depends on commands.js. This now works by
iterating over source files and parsing them directly.
Partially related to issue #1160 and #1172.
Test: npm run gendocs
No change to logic. This refactors the exec-child.js script to move all
of its main logic into a main() function. This function is only invoked
if the script is executed, not when it is imported.
Importing the script is now a NOOP instead of throwing an exception.
It's still not advisable to import the script, however this can be done
if absolutely necessary to trick JavaScript bundlers which try to prune
non-imported code files.
Partially related to issue #1160 and #1172.
This updates `eslint-config-airbnb-base` and `eslint-plugin-import`.
This also addresses lint errors these updates raise, and excludes
several rules.
This also adds a minor simplification to the gendocs script.
Test: npm run lint
Test: npm run gendocs
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
* 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
run-tests.js previously relied on shell wildcard expansion, and did not specify
full paths. This uses common.expand to handle globbing internally, and specifies
the full path, so jshint can find all the files.