nmake
v1.0.0
Published
js make wrapper
Downloads
19
Readme
About
Nmake is a small program which wraps make
to provide additional functionality, such as user-friendly help output, remote includes,
and eventually more. It otherwise acts as a pass-through to standard make.
Inspired by Mmake
Installation
Install globally
npm i -g nmake
Next add the following alias to your profile:
alias make=nmake
Features
Help output
Make's primary function is not to serve as a "task runner", however it's often used for that scenario due to its ubiquitous nature, and if you're already using it, why not! Make is however lacking a built-in mechanism for displaying help information.
Here's an example Makefile:
# Start the dev server.
#
# Note that the API server must
# also be running.
start:
@gopherjs -m -v serve --http :3000 github.com/tj/docs/client
.PHONY: start
# Start the API server.
api:
@go run server/cmd/api/api.go
.PHONY: api
# Display dependency graph.
deps:
@godepgraph github.com/tj/docs/client | dot -Tsvg | browser
.PHONY: deps
# Display size of dependencies.
size:
@gopherjs build client/*.go -m -o /tmp/out.js
@du -h /tmp/out.js
@gopher-count /tmp/out.js | sort -nr
.PHONY: size
Nmake provides a help
command to display all target comments in short form:
$ alias make=nmake
$ make help
start Start the dev server.
api Start the API server.
deps Display dependency graph.
size Display size of dependencies.
The help <target>
command is also supported to display long form:
$ make help start
Start the dev server.
Note that the API server must
also be running.
The default behaviour of Make is of course preserved:
$ make
serving at http://localhost:3000 and on port 3000 of any available addresses
$ make size
...
Remote includes (WIP)
Links
- mmake Mmake
Badges