Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 76e3a0e

Browse files
committed
Add makefile to begin move to a more structured project
1 parent e4f8718 commit 76e3a0e

File tree

5 files changed

+56
-14
lines changed

5 files changed

+56
-14
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
coverage
3-
npm-debug.log
2+
npm-debug.log
3+
.nyc_output

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
language: node_js
22
node_js:
3-
- "0.11"
4-
- "0.10"
3+
- "node"
4+
- "iojs"
5+
- "4"
56

6-
after_script: NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
7+
install: make clean build
8+
script: make test
9+
after_success: make coverage

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
PATH := node_modules/.bin:$(PATH)
2+
SHELL := /bin/bash
3+
4+
SRC = $(wildcard src/*.js)
5+
LIB = $(SRC:src/%.js=lib/%.js)
6+
TST = $(wildcard test/*.js) $(wildcard test/**/*.js)
7+
NPM = @npm install --local > /dev/null && touch node_modules
8+
9+
v ?= patch
10+
11+
node_modules: package.json
12+
$(NPM)
13+
node_modules/%:
14+
$(NPM)
15+
16+
test: node_modules
17+
@mocha $(TST)
18+
19+
.nyc_output: node_modules
20+
@nyc $(MAKE) test
21+
22+
coverage: .nyc_output
23+
@nyc report --reporter=text-lcov | coveralls
24+
25+
dev: node_modules
26+
@nodemon -q -x "(clear; nyc $(MAKE) test && nyc report) || true"
27+
28+
release: clean node_modules test
29+
@npm version $(v)
30+
@npm publish
31+
@git push --follow-tags
32+
33+
clean:
34+
@rm -rf $$(cat .gitignore)
35+
36+
.PHONY: test coverage dev release clean

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ Status
4242

4343
[![Build Status](http://img.shields.io/travis/mstade/funkis.svg?style=flat-square)](https://travis-ci.org/mstade/funkis)
4444
[![Coverage Status](http://img.shields.io/coveralls/mstade/funkis.svg?style=flat-square)](https://coveralls.io/r/mstade/funkis?branch=master)
45+
46+
---
47+
48+
[LICENSE](LICENSE)

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
"version": "0.2.0",
44
"description": "Functional programming in JavaScript.",
55
"main": "index.js",
6-
"scripts": {
7-
"test": "istanbul test ./node_modules/mocha/bin/_mocha --report html -- -R spec"
8-
},
9-
"author": "Marcus Stade",
6+
"author": "Marcus Stade <[email protected]> (http://madebystade.se)",
107
"license": "MIT",
118
"devDependencies": {
12-
"coveralls": "~2.8.0",
13-
"expect.js": "^0.3.1",
14-
"istanbul": "~0.2.4",
15-
"mocha": "~1.17.1",
9+
"coveralls": "2.8.0",
10+
"expect.js": "0.3.1",
11+
"gitbook-cli": "0.3.6",
12+
"mocha": "1.17.1",
1613
"mocha-lcov-reporter": "0.0.1",
17-
"must": "git://github.com/mstade/js-must#throw-error-instance"
14+
"must": "git://github.com/mstade/js-must#throw-error-instance",
15+
"nodemon": "1.7.1",
16+
"nyc": "3.2.2"
1817
},
1918
"repository": {
2019
"type": "git",

0 commit comments

Comments
 (0)