mirror of
https://github.com/debug-js/debug.git
synced 2025-12-08 20:59:48 +00:00
clean up builds
This commit is contained in:
parent
9f4f8f59ba
commit
3ca23316a4
15
.npmignore
15
.npmignore
@ -1,15 +0,0 @@
|
||||
support
|
||||
test
|
||||
examples
|
||||
example
|
||||
*.sock
|
||||
dist
|
||||
yarn.lock
|
||||
coverage
|
||||
bower.json
|
||||
.coveralls.yml
|
||||
.eslintrc
|
||||
.travis.yml
|
||||
.npmignore
|
||||
karma.conf.js
|
||||
Makefile
|
||||
40
Makefile
40
Makefile
@ -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
|
||||
|
||||
dist/debug.js: src/*.js
|
||||
.INTERMEDIATE: dist/debug.es6.js
|
||||
dist/debug.es6.js: src/*.js
|
||||
@mkdir -p dist
|
||||
@$(BROWSERIFY) --standalone debug . > $@.es6.js
|
||||
@babel $@.es6.js > $@
|
||||
@rm $@.es6.js
|
||||
browserify --standalone debug $< > $@
|
||||
|
||||
dist/debug.js: dist/debug.es6.js
|
||||
@mkdir -p dist
|
||||
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
|
||||
|
||||
@ -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)",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user