Refactor Makefile
This commit is contained in:
parent
b8fb67beb5
commit
974536c669
34
Makefile
34
Makefile
|
@ -1,25 +1,33 @@
|
||||||
## TESTS
|
|
||||||
|
|
||||||
TESTER = ./node_modules/.bin/mocha
|
TESTER = ./node_modules/.bin/mocha
|
||||||
OPTS = --growl
|
OPTS = --growl
|
||||||
TESTS = test/*.test.js
|
TESTS = test/*.test.js
|
||||||
|
|
||||||
|
default: help
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help:
|
||||||
|
@echo 'Usage: make [target]'
|
||||||
|
@echo 'Targets:'
|
||||||
|
@echo ' help Print help (this message)'
|
||||||
|
@echo ' test Run tests in silent mode'
|
||||||
|
@echo ' test-verbose Run tests in verbose mode'
|
||||||
|
@echo ' testing Run tests continuously'
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
NO_DEPRECATION=loopback-datasource-juggler $(TESTER) $(OPTS) $(TESTS)
|
NO_DEPRECATION=loopback-datasource-juggler $(TESTER) $(OPTS) $(TESTS)
|
||||||
|
|
||||||
|
.PHONY: test-verbose
|
||||||
test-verbose:
|
test-verbose:
|
||||||
$(TESTER) $(OPTS) --reporter spec $(TESTS)
|
$(TESTER) $(OPTS) --reporter spec $(TESTS)
|
||||||
|
|
||||||
|
.PHONY: testing
|
||||||
testing:
|
testing:
|
||||||
$(TESTER) $(OPTS) --watch $(TESTS)
|
$(TESTER) $(OPTS) --watch $(TESTS)
|
||||||
|
|
||||||
|
# Deprecated targets
|
||||||
|
|
||||||
|
.PHONY: about-testing
|
||||||
about-testing:
|
about-testing:
|
||||||
@echo "\n## TESTING\n"
|
@echo 'DEPRECATED: Use `make help` instead'
|
||||||
@echo " make test # Run all tests in silent mode"
|
make help
|
||||||
@echo " make test-verbose # Run all tests in verbose mode"
|
|
||||||
@echo " make testing # Run tests continuously"
|
|
||||||
|
|
||||||
|
|
||||||
## HELP
|
|
||||||
|
|
||||||
help: about-testing
|
|
||||||
|
|
||||||
.PHONY: test
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
"depd": "./lib/browser.depd.js"
|
"depd": "./lib/browser.depd.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"help": "make help",
|
||||||
"test": "make test"
|
"test": "make test"
|
||||||
},
|
},
|
||||||
"engines": [
|
"engines": [
|
||||||
|
|
Loading…
Reference in New Issue