From 4c1febf90b9f26390a65b7e3191ebbe6902dfc01 Mon Sep 17 00:00:00 2001 From: Jared Hanson Date: Tue, 19 Sep 2017 17:09:53 -0700 Subject: [PATCH] Update support files. --- .gitignore | 4 ++-- .jshintrc | 2 -- .npmignore | 15 ++---------- .travis.yml | 28 ++++++++++++++-------- LICENSE | 4 ++-- Makefile | 52 ++++++++++------------------------------ package.json | 27 ++++++++++----------- support/mk/browserify.mk | 10 -------- support/mk/coveralls.mk | 7 ------ support/mk/istanbul.mk | 20 ---------------- support/mk/jshint.mk | 7 ------ support/mk/mocha.mk | 13 ---------- support/mk/node.mk | 8 ------- support/mk/notes.mk | 7 ------ support/mk/testling.mk | 7 ------ 15 files changed, 49 insertions(+), 162 deletions(-) delete mode 100644 support/mk/browserify.mk delete mode 100644 support/mk/coveralls.mk delete mode 100644 support/mk/istanbul.mk delete mode 100644 support/mk/jshint.mk delete mode 100644 support/mk/mocha.mk delete mode 100644 support/mk/node.mk delete mode 100644 support/mk/notes.mk delete mode 100644 support/mk/testling.mk diff --git a/.gitignore b/.gitignore index f0305cb..e705ba7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -build -reports +docs/ +reports/ # Mac OS X .DS_Store diff --git a/.jshintrc b/.jshintrc index a07354b..f1149ee 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,6 +1,5 @@ { "node": true, - "bitwise": true, "camelcase": true, "curly": true, @@ -15,6 +14,5 @@ "undef": true, "unused": true, "trailing": true, - "laxcomma": true } diff --git a/.npmignore b/.npmignore index 3286d94..a50451d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,19 +1,8 @@ -README.md Makefile -build/ docs/ examples/ reports/ -support/ test/ -# Mac OS X -.DS_Store - -# Node.js -.npmignore -node_modules/ -npm-debug.log - -# Git -.git* +.jshintrc +.travis.yml diff --git a/.travis.yml b/.travis.yml index 77a7fa4..2cf8b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,26 @@ language: "node_js" node_js: - - "0.4" - - "0.6" - - "0.8" - - "0.10" + - "8" + - "7" + - "6" + - "5" + - "4" + - "3" # io.js + - "2" # io.js + - "1" # io.js - "0.12" - - "4.0" - - "4.1" + - "0.10" + - "0.8" + before_install: - - "npm install istanbul -g" - - "npm install coveralls -g" + - "npm install make-node@0.3.x -g" + - "preinstall-compat" -script: "make ci-travis" +script: + - "make test-cov" after_success: - - "make submit-coverage-to-coveralls" + - "make report-cov" + +sudo: false diff --git a/LICENSE b/LICENSE index e33bd10..76f6d08 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ -(The MIT License) +The MIT License (MIT) -Copyright (c) 2013 Jared Hanson +Copyright (c) 2013-2017 Jared Hanson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/Makefile b/Makefile index 6c062f1..48577d3 100644 --- a/Makefile +++ b/Makefile @@ -1,49 +1,23 @@ -SOURCES = *.js -TESTS = test/*.test.js +include node_modules/make-node/main.mk -lint: lint-jshint -test: test-mocha -test-cov: test-istanbul-mocha -view-cov: view-istanbul-report +SOURCES = lib/*.js lib/**/*.js +TESTS = test/*.test.js test/**/*.test.js -# ============================================================================== -# Node.js -# ============================================================================== -include support/mk/node.mk -include support/mk/mocha.mk +LCOVFILE = ./reports/coverage/lcov.info -# ============================================================================== -# Browserify -# ============================================================================== -BROWSERIFY_MAIN = ./index.js -include support/mk/browserify.mk -include support/mk/testling.mk +view-docs: + open ./docs/index.html -# ============================================================================== -# Code Quality -# ============================================================================== -include support/mk/notes.mk -include support/mk/jshint.mk -include support/mk/istanbul.mk +view-cov: + open ./reports/coverage/lcov-report/index.html -# ============================================================================== -# Continuous Integration -# ============================================================================== -include support/mk/coveralls.mk +clean: clean-docs clean-cov + -rm -r $(REPORTSDIR) -ci-travis: test test-cov -submit-coverage-to-coveralls: submit-istanbul-lcov-to-coveralls +clobber: clean + -rm -r node_modules -# ============================================================================== -# Clean -# ============================================================================== -clean: - rm -rf build - rm -rf reports -clobber: clean clobber-node - - -.PHONY: lint test test-cov view-cov ci-travis clean clobber +.PHONY: clean clobber diff --git a/package.json b/package.json index bde8254..5ff4059 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,11 @@ "keywords": [ "util" ], + "author": { + "name": "Jared Hanson", + "email": "jaredhanson@gmail.com", + "url": "http://www.jaredhanson.net/" + }, "repository": { "type": "git", "url": "git://github.com/jaredhanson/utils-merge.git" @@ -12,16 +17,18 @@ "bugs": { "url": "http://github.com/jaredhanson/utils-merge/issues" }, - "author": { - "name": "Jared Hanson", - "email": "jaredhanson@gmail.com", - "url": "http://www.jaredhanson.net/" - }, "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "http://opensource.org/licenses/MIT" + } + ], "main": "./index", "dependencies": { }, "devDependencies": { + "make-node": "0.3.x", "mocha": "1.x.x", "chai": "1.x.x" }, @@ -30,15 +37,5 @@ }, "scripts": { "test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js" - }, - "testling": { - "browsers": [ - "chrome/latest" - ], - "harness" : "mocha", - "files": [ - "test/bootstrap/testling.js", - "test/*.test.js" - ] } } diff --git a/support/mk/browserify.mk b/support/mk/browserify.mk deleted file mode 100644 index da26850..0000000 --- a/support/mk/browserify.mk +++ /dev/null @@ -1,10 +0,0 @@ -BROWSERIFY ?= browserify -BROWSERIFY_MAIN ?= index.js -BROWSERIFY_OUT ?= build/bundle.js - -build-browserify: node_modules - mkdir -p build - $(BROWSERIFY) $(BROWSERIFY_MAIN) -o $(BROWSERIFY_OUT) - - -.PHONY: build-browserify diff --git a/support/mk/coveralls.mk b/support/mk/coveralls.mk deleted file mode 100644 index 4b32025..0000000 --- a/support/mk/coveralls.mk +++ /dev/null @@ -1,7 +0,0 @@ -COVERALLS ?= coveralls - -submit-istanbul-lcov-to-coveralls: - cat $(ISTANBUL_LCOV_INFO_PATH) | $(COVERALLS) - - -.PHONY: submit-istanbul-lcov-to-coveralls diff --git a/support/mk/istanbul.mk b/support/mk/istanbul.mk deleted file mode 100644 index 7538dfd..0000000 --- a/support/mk/istanbul.mk +++ /dev/null @@ -1,20 +0,0 @@ -ISTANBUL ?= istanbul -ISTANBUL_OUT ?= ./reports/coverage -ISTANBUL_REPORT ?= lcov -ISTANBUL_HTML_REPORT_PATH ?= $(ISTANBUL_OUT)/lcov-report/index.html -ISTANBUL_LCOV_INFO_PATH ?= $(ISTANBUL_OUT)/lcov.info - - -test-istanbul-mocha: node_modules - NODE_PATH=$(NODE_PATH_TEST) \ - $(ISTANBUL) cover \ - --dir $(ISTANBUL_OUT) --report $(ISTANBUL_REPORT) \ - $(_MOCHA) -- \ - --reporter $(MOCHA_REPORTER) \ - --require $(MOCHA_REQUIRE) $(TESTS) - -view-istanbul-report: - open $(ISTANBUL_HTML_REPORT_PATH) - - -.PHONY: test-istanbul-mocha view-istanbul-report diff --git a/support/mk/jshint.mk b/support/mk/jshint.mk deleted file mode 100644 index 695d862..0000000 --- a/support/mk/jshint.mk +++ /dev/null @@ -1,7 +0,0 @@ -JSHINT ?= jshint - -lint-jshint: - $(JSHINT) $(SOURCES) - - -.PHONY: lint-jshint diff --git a/support/mk/mocha.mk b/support/mk/mocha.mk deleted file mode 100644 index aa9a9de..0000000 --- a/support/mk/mocha.mk +++ /dev/null @@ -1,13 +0,0 @@ -MOCHA ?= ./node_modules/.bin/mocha -_MOCHA ?= ./node_modules/.bin/_mocha -MOCHA_REPORTER ?= spec -MOCHA_REQUIRE ?= ./test/bootstrap/node - -test-mocha: node_modules - NODE_PATH=$(NODE_PATH_TEST) \ - $(MOCHA) \ - --reporter $(MOCHA_REPORTER) \ - --require $(MOCHA_REQUIRE) $(TESTS) - - -.PHONY: test-mocha diff --git a/support/mk/node.mk b/support/mk/node.mk deleted file mode 100644 index 8383f96..0000000 --- a/support/mk/node.mk +++ /dev/null @@ -1,8 +0,0 @@ -node_modules: - npm install - -clobber-node: - rm -rf node_modules - - -.PHONY: clobber-node diff --git a/support/mk/notes.mk b/support/mk/notes.mk deleted file mode 100644 index 6d75db6..0000000 --- a/support/mk/notes.mk +++ /dev/null @@ -1,7 +0,0 @@ -NOTES ?= 'TODO|FIXME' - -notes: - grep -Ern $(NOTES) $(SOURCES) $(TESTS) - - -.PHONY: notes diff --git a/support/mk/testling.mk b/support/mk/testling.mk deleted file mode 100644 index e27e812..0000000 --- a/support/mk/testling.mk +++ /dev/null @@ -1,7 +0,0 @@ -TESTLING ?= testling - -test-testling: node_modules - $(TESTLING) - - -.PHONY: test-testling