An open API service indexing awesome lists of open source software.

https://github.com/zentered/makefile-example

Node.js Makefile and Environment
https://github.com/zentered/makefile-example

Last synced: 10 months ago
JSON representation

Node.js Makefile and Environment

Awesome Lists containing this project

README

          

[![HC](https://img.shields.io/badge/zentered-consulting-333333.svg?style=for-the-badge)]()

# Makefile for test and development environment

Full article: https://zentered.co/articles/makefile-for-node-js-developers/

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