Skip to content

Commit

Permalink
clean up builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Sep 11, 2018
1 parent 9f4f8f5 commit 3ca2331
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 40 deletions.
15 changes: 0 additions & 15 deletions .npmignore

This file was deleted.

40 changes: 16 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,47 +1,39 @@
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
# http://stackoverflow.com/a/5982798/376773
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)

# BIN directory
BIN := $(THIS_DIR)/node_modules/.bin

# Path
PATH := node_modules/.bin:$(PATH)
export PATH := $(THIS_DIR)/node_modules/.bin:$(PATH)
SHELL := /bin/bash

# applications
BROWSERIFY ?= $(BIN)/browserify

all: lint test

browser: dist/debug.js dist/test.js
dist: dist/debug.js dist/test.js

.INTERMEDIATE: dist/debug.es6.js
dist/debug.es6.js: src/*.js
@mkdir -p dist
browserify --standalone debug $< > $@

dist/debug.js: src/*.js
dist/debug.js: dist/debug.es6.js
@mkdir -p dist
@$(BROWSERIFY) --standalone debug . > $@.es6.js
@babel $@.es6.js > $@
@rm $@.es6.js
babel $< > $@

dist/test.js: test.js
@mkdir -p dist
@cp $< $@.es6.js
@babel $@.es6.js > $@
@rm $@.es6.js
babel $< > $@

lint:
@xo
xo

test-node:
@istanbul cover node_modules/mocha/bin/_mocha -- test.js
istanbul cover node_modules/mocha/bin/_mocha -- test.js
@cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

test-browser:
@$(MAKE) browser
@karma start --single-run
test-browser: dist
karma start --single-run

test: test-node test-browser

clean:
rm -rf dist coverage

.PHONY: all browser install clean lint test test-node test-browser
.PHONY: all dist clean lint test test-node test-browser
1 change: 0 additions & 1 deletion node.js

This file was deleted.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"log",
"debugger"
],
"files": [
"src",
"dist/debug.js",
"LICENSE",
"README.md"
],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
Expand Down

0 comments on commit 3ca2331

Please sign in to comment.