SIGN IN SIGN UP
restify / node-restify UNCLAIMED

The future of Node.js REST development

0 0 80 JavaScript
#
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
#
2012-05-03 14:11:06 -07:00
# Makefile: basic Makefile for template API service
#
# This Makefile is a template for new repos. It contains only repo-specific
# logic and uses included makefiles to supply common targets (javascriptlint,
# jsstyle, restdown, etc.), which are used by other repos as well. You may well
# need to rewrite most of this file, but you shouldn't need to touch the
# included makefiles.
#
# If you find yourself adding support for new targets that could be useful for
# other projects too, you should add these to the original versions of the
# included Makefiles (in eng.git) so that other teams can use them too.
#
#
# Tools
#
2015-05-20 18:46:32 -07:00
ESLINT := ./node_modules/.bin/eslint
DOCUMENTATION := ./node_modules/.bin/documentation
NODEUNIT := ./node_modules/.bin/nodeunit
2017-05-11 12:53:16 -07:00
MOCHA := ./node_modules/.bin/mocha
NODECOVER := ./node_modules/.bin/cover
DOCS_BUILD := ./tools/docsBuild.js
2012-05-03 14:11:06 -07:00
NPM := npm
NODE := node
PRETTIER := ./node_modules/.bin/prettier
#
# Files
#
2015-05-22 12:14:52 -07:00
JS_FILES = '.'
2012-05-03 14:11:06 -07:00
CLEAN_FILES += node_modules cscope.files
2012-05-03 14:11:06 -07:00
include ./tools/mk/Makefile.defs
#
# Repo-specific targets
#
.PHONY: all
2012-05-03 14:11:06 -07:00
all: $(NODEUNIT) $(REPO_DEPS)
$(NPM) rebuild
2012-05-03 14:11:06 -07:00
$(NODEUNIT): | $(NPM_EXEC)
$(NPM) install
2012-05-03 14:11:06 -07:00
$(NODECOVER): | $(NPM_EXEC)
2011-12-16 18:03:52 -08:00
$(NPM) install
2011-12-19 13:49:03 -08:00
2012-05-03 14:11:06 -07:00
.PHONY: cover
cover: $(NODECOVER)
@rm -fr ./.coverage_data
2017-05-11 12:53:16 -07:00
$(NODECOVER) run $(NODEUNIT) ./test/*.js
2012-05-03 14:11:06 -07:00
$(NODECOVER) report html
2012-05-03 14:11:06 -07:00
CLEAN_FILES += $(TAP) ./node_modules/nodeunit
2012-05-03 14:11:06 -07:00
.PHONY: test
test: $(NODEUNIT)
$(NODEUNIT) test/*.test.js
$(MOCHA) --full-trace --no-exit test/plugins/*.test.js
.PHONY: docs-build
docs-build:
@($(NODE) $(DOCS_BUILD))
.PHONY: benchmark
benchmark:
@(cd ./benchmark && $(NPM) i && $(NODE) index.js)
.PHONY: audit
audit:
@($(NPM) audit || true)
2012-05-03 14:11:06 -07:00
include ./tools/mk/Makefile.deps
include ./tools/mk/Makefile.targ