Merge pull request #776 from strongloop/update-helper-scripts
Update helper scripts
This commit is contained in:
commit
48695b711f
44
Makefile
44
Makefile
|
@ -1,25 +1,43 @@
|
||||||
## 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: clean
|
||||||
|
clean:
|
||||||
|
rm -rf $(CURDIR)/node_modules
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help:
|
||||||
|
@echo 'Usage: make [target]'
|
||||||
|
@echo 'Targets:'
|
||||||
|
@echo ' clean Delete `node_modules`'
|
||||||
|
@echo ' help Print help (this message)'
|
||||||
|
@echo ' refresh Delete `node_modules` and run `npm install`'
|
||||||
|
@echo ' test Run tests in silent mode'
|
||||||
|
@echo ' test-verbose Run tests in verbose mode'
|
||||||
|
@echo ' testing Run tests continuously'
|
||||||
|
|
||||||
|
.PHONY: refresh
|
||||||
|
refresh: clean
|
||||||
|
npm install
|
||||||
|
|
||||||
|
.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,9 @@
|
||||||
"depd": "./lib/browser.depd.js"
|
"depd": "./lib/browser.depd.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"clean": "make clean",
|
||||||
|
"help": "make help",
|
||||||
|
"refresh": "make refresh",
|
||||||
"test": "make test"
|
"test": "make test"
|
||||||
},
|
},
|
||||||
"engines": [
|
"engines": [
|
||||||
|
|
Loading…
Reference in New Issue