0.1.3 • Published 10 years ago

make2tap v0.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

make2tap

Build Status Code Climate Test Coverage

Leverage TAP to transform your ugly make outputs into nice readable ones using any TAP reporter like tap-spec or tap-dot.

Usage

Assuming make2tap is in your path (using npm scripts), simply pipe make output to it

Assuming this is your makefile

clean:
	## Clean
	# remove /dist
	@rm -rf dist

build:
	## Build js files
	# compile to js
	@echo 'compile output...'
	# minify
	@echo 'minify output...'

Then

make clean compile 2>&1 | make2tap

Note: 2>&1 is quite important here, it allows make stderr stream to be piped to make2tap as well so we can handle errors.

Ouputs:

TAP version 13
# Clean
ok 1 - remove /dist
TAP version 13
# Build js files
ok 2 - compile to js
compile output...
ok 3 - minify
minify output...
1..3

Of course, you should pipe it to the TAP reporter of your choice:

make clean build | make2tap | tap-spec

tap-spec

Comment syntax

make2tap understand a few kinds of lines:

  • ## Task title: as a TAP Diagnostic, aka a section, or title
  • # Step name: as a TAP test line, which will use a single step
  • anything else: as regular output, not handled as part of the result but still shown, will us it to show commands output.

You'll probably want to structure your makefile as such:

build:
	## Build js files

	# compile to js
	@echo 'compile output...'

	# minify
	@echo 'minify output...'
0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago