From 3ca23316a470f6bc6e0d75d297179cfc19bbc763 Mon Sep 17 00:00:00 2001 From: Josh Junon Date: Mon, 10 Sep 2018 23:45:28 -0600 Subject: [PATCH] clean up builds --- .npmignore | 15 --------------- Makefile | 40 ++++++++++++++++------------------------ node.js | 1 - package.json | 6 ++++++ 4 files changed, 22 insertions(+), 40 deletions(-) delete mode 100644 .npmignore delete mode 100644 node.js diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 9c93383c..00000000 --- a/.npmignore +++ /dev/null @@ -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 diff --git a/Makefile b/Makefile index 663744fb..e28468e6 100644 --- a/Makefile +++ b/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 + +.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 diff --git a/node.js b/node.js deleted file mode 100644 index 7fc36fe6..00000000 --- a/node.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./src/node'); diff --git a/package.json b/package.json index 6a15aed3..c07c03b3 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,12 @@ "log", "debugger" ], + "files": [ + "src", + "dist/debug.js", + "LICENSE", + "README.md" + ], "author": "TJ Holowaychuk ", "contributors": [ "Nathan Rajlich (http://n8.io)",