Merge pull request #776 from strongloop/update-helper-scripts

Update helper scripts
This commit is contained in:
Simon Ho 2015-11-27 17:59:09 -08:00
commit 48695b711f
2 changed files with 34 additions and 13 deletions

View File

@ -1,25 +1,43 @@
## TESTS
TESTER = ./node_modules/.bin/mocha
OPTS = --growl
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:
NO_DEPRECATION=loopback-datasource-juggler $(TESTER) $(OPTS) $(TESTS)
.PHONY: test-verbose
test-verbose:
$(TESTER) $(OPTS) --reporter spec $(TESTS)
.PHONY: testing
testing:
$(TESTER) $(OPTS) --watch $(TESTS)
# Deprecated targets
.PHONY: about-testing
about-testing:
@echo "\n## TESTING\n"
@echo " make test # Run all tests in silent mode"
@echo " make test-verbose # Run all tests in verbose mode"
@echo " make testing # Run tests continuously"
## HELP
help: about-testing
.PHONY: test
@echo 'DEPRECATED: Use `make help` instead'
make help

View File

@ -20,6 +20,9 @@
"depd": "./lib/browser.depd.js"
},
"scripts": {
"clean": "make clean",
"help": "make help",
"refresh": "make refresh",
"test": "make test"
},
"engines": [