Skip to content

Commit

Permalink
clean up makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Sep 11, 2018
1 parent 833b6f8 commit 62822f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
30 changes: 7 additions & 23 deletions Makefile
Expand Up @@ -15,22 +15,16 @@ YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
BROWSERIFY ?= $(NODE) $(BIN)/browserify

install: node_modules
all: lint test

browser: dist/debug.js

node_modules: package.json
@NODE_ENV= $(PKG) install
@touch node_modules

dist/debug.js: src/*.js node_modules
dist/debug.js: src/*.js
@mkdir -p dist
@$(BROWSERIFY) \
--standalone debug \
. > dist/debug.js
@$(BROWSERIFY) --standalone debug . > dist/debug.js

lint:
@eslint *.js src/*.js
@xo

test-node:
@istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
Expand All @@ -40,19 +34,9 @@ test-browser:
@$(MAKE) browser
@karma start --single-run

test-all:
@concurrently \
"make test-node" \
"make test-browser"

test:
@if [ "x$(BROWSER)" = "x" ]; then \
$(MAKE) test-node; \
else \
$(MAKE) test-browser; \
fi
test: test-node test-browser

clean:
rimraf dist coverage
rm -rf dist coverage

.PHONY: browser install clean lint test test-all test-node test-browser
.PHONY: all browser install clean lint test test-node test-browser
4 changes: 0 additions & 4 deletions package.json
Expand Up @@ -6,9 +6,6 @@
"url": "git://github.com/visionmedia/debug.git"
},
"description": "small debugging utility",
"scripts": {
"test": "xo && mocha"
},
"keywords": [
"debug",
"log",
Expand All @@ -28,7 +25,6 @@
"chai": "^3.5.0",
"concurrently": "^3.1.0",
"coveralls": "^3.0.2",
"eslint": "^3.12.1",
"istanbul": "^0.4.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
Expand Down

0 comments on commit 62822f1

Please sign in to comment.