-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnpm.mk
More file actions
30 lines (23 loc) · 756 Bytes
/
npm.mk
File metadata and controls
30 lines (23 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This Makefile describes the behavior of a node that was handling by node and npm.
include git.mk
# Get the npm bin path.
NPM := $(or $(shell which npm),/usr/local/bin/npm)
.PHONY: npm-install
npm-install:
#### Node( '$(NODE)' ).Call( '$@' )
$(NPM) install
# Performance section. Testing, benchmarking, profiling, tracing, debugging, etc.
.PHONY: npm-test
npm-test: npm-install
#### Node( '$(NODE)' ).Call( '$@' )
$(NPM) test
# Build and run section. Convert source code to executable and provide process.
# Provide multiple options for building (bin, lib, etc).
# Calculate build variables.
TIMESTAMP := $(shell date +%s)
.PHONY: npm-build
npm-build: npm-install
$(NPM) run build
.PHONY: npm-export
npm-export: npm-install
$(NPM) run export