Skip to content
Permalink
Browse files
clean up builds
  • Loading branch information
Qix- committed Sep 11, 2018
1 parent 9f4f8f5 commit 3ca23316a470f6bc6e0d75d297179cfc19bbc763
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 40 deletions.

This file was deleted.

@@ -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

This file was deleted.

@@ -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)",

0 comments on commit 3ca2331

Please sign in to comment.