Skip to content
Node.js Makefile and Environment
JavaScript Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
Dockerfile
LICENSE
Makefile
README.md
docker-compose.yml
index.js
package.json

README.md

HC

Makefile for test and development environment

Full article: https://medium.com/heneise/makefile-for-node-js-developers-34c407005a3b

This is an example on how we use the Makefile to simulate different environments.

Development

make dev (NODE_ENV = development)

Test

make test (NODE_ENV = test)

TAP version 13
# add
ok 1 1 + 1 = 2
# subtract
ok 2 1 - 1 = 0

1..2
# tests 2
# pass  2

# ok

Watch

make watch (NODE_ENV = development)

change:test/index.js
TAP version 13
# add
add
ok 1 1 + 1 = 2
# subtract
subtract
ok 2 1 - 1 = 0

1..2
# tests 2
# pass  2

# ok
You can’t perform that action at this time.