mirror of
https://github.com/debug-js/debug.git
synced 2026-01-18 16:12:38 +00:00
Makefile tweaks
Re-introduce `make browser` to make a standalone build of `debug.js` for the web browser.
This commit is contained in:
parent
87880f6ae1
commit
ce1a236d93
31
Makefile
31
Makefile
@ -15,31 +15,31 @@ YARN ?= $(shell which yarn)
|
||||
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
|
||||
BROWSERIFY ?= $(NODE) $(BIN)/browserify
|
||||
|
||||
.FORCE:
|
||||
|
||||
install: node_modules
|
||||
|
||||
browser: dist/debug.js
|
||||
|
||||
node_modules: package.json
|
||||
@NODE_ENV= $(PKG) install
|
||||
@touch node_modules
|
||||
|
||||
lint: .FORCE
|
||||
eslint *.js src/*.js
|
||||
|
||||
test-node: .FORCE
|
||||
istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
|
||||
|
||||
test-browser: .FORCE
|
||||
mkdir -p dist
|
||||
|
||||
dist/debug.js: src/*.js node_modules
|
||||
@mkdir -p dist
|
||||
@$(BROWSERIFY) \
|
||||
--standalone debug \
|
||||
. > dist/debug.js
|
||||
|
||||
karma start --single-run
|
||||
rimraf dist
|
||||
lint:
|
||||
eslint *.js src/*.js
|
||||
|
||||
test: .FORCE
|
||||
test-node:
|
||||
istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
|
||||
|
||||
test-browser:
|
||||
$(MAKE) browser
|
||||
karma start --single-run
|
||||
|
||||
test:
|
||||
concurrently \
|
||||
"make test-node" \
|
||||
"make test-browser"
|
||||
@ -47,4 +47,7 @@ test: .FORCE
|
||||
coveralls:
|
||||
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
|
||||
|
||||
clean:
|
||||
rimraf dist
|
||||
|
||||
.PHONY: all install clean distclean
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user