Closed kevinburkeshyp closed 8 years ago
Thanks for the PR! Couple of quick things
any script run by npm run
/ npm test
has access to any "binaries" provided by locally installed npm modules as if those binaries were on the global path (npm modifies the path while it runs). So it's totally cool to have things expresso -I lib test/*.js
for npm test
You could make the makefile something like this if you just want Make
equivs of the npm commands:
(npm install will by default will install dev dependencies as well so need for a seperate install-test).
The reason the for having the seperate install-lint stuff was because the eslint tools require a higher version of node/npm than the minimum version the library supports.
.PHONY: all clean install check test lint-install lint
all:
clean:
rm -rf node_modules
install:
npm install
check:
npm test
test:
npm test
lint-install:
npm lint-install
lint:
npm run lint
I've got your changes + my changes on a branch on my laptop and can merge them in, but wondered if you wanted to make them yourself to this PR and then I'll merge that instead, whichever works for.
Just pushed 863d2a5 with the changes you suggested. Note the -I
flag is not a valid expresso flag, as far as I can tell:
$ ./node_modules/.bin/expresso --help
Usage: expresso [options] <file ...>
Options:
-g, --growl Enable growl notifications
-c, --coverage Generate and report test coverage
-j, --json PATH Used in conjunction with --coverage, ouput JSON coverage to PATH
-q, --quiet Suppress coverage report if 100%
-t, --timeout MS Timeout in milliseconds, defaults to 2000
-r, --require PATH Require the given module path
-o, --only TESTS Execute only the comma sperated TESTS (can be set several times)
-m, --match EXP Execute only tests matching a given regular expression (can be set several times)
-p, --port NUM Port number for test servers, starts at 5555
-s, --serial Execute tests serially
-b, --boring Suppress ansi-escape colors
-v, --version Output version number
-h, --help Display help information
er, 81f12a6
Awesome, thanks.
Yep, by the looks of it that option was removed a long long time ago https://github.com/visionmedia/expresso/commit/69618792581a9b145ef1d0f62a52ea3025714689
shipped in 2.4.1
This adds Make targets for common tasks:
I believe the README may be incorrect, since "npm install" installs into the
node_modules
repo, butnpm test
etc may be counting on the global name space.