Here is what I've got so far:
SPECS = $(shell find spec -iname "*_spec.js")
spec:
@NODE_ENV=test \
@NODE_PATH=lib \
./node_modules/.bin/expresso \
$(TESTFLAGS) \
$(SPECS)
cov:
@TESTFLAGS=--cov $(MAKE) spec
.PHONY: spec cov
Output: /bin/sh: @NODE_PATH=lib: command not found
If I set one variable only it's working fine. What am I doing wrong?
Use '@' only once. It is only needed at the very beginning of the string, but you have it twice. The line continuations are very literal, and your current code reads:
@NODE_ENV=test @NODE_PATH=lib ./node_modules/.bin/expresso $(TESTFLAGS) $(SPECS)
The '@' on NODE_PATH is getting passed to the shell, which you do not want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With