-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (23 loc) · 745 Bytes
/
Makefile
File metadata and controls
32 lines (23 loc) · 745 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
31
SHELL := /bin/bash
# Config
PORT ?= 8000
HOST ?= 127.0.0.1
.PHONY: help install dev build serve build-serve
## help: Show available targets
help:
@grep -E '^##' Makefile | sed -E 's/## //' | column -t -s ':'
## install: Install project dependencies (npm ci fallback to npm install)
install:
npm ci || npm install
## dev: Run Next.js in development mode at http://localhost:3000
dev:
npm run dev
## build: Build production (static export expected into ./out)
build:
npm run build
## serve: Serve the static ./out folder on $(HOST):$(PORT)
serve:
npx http-server ./out -a $(HOST) -p $(PORT) -c-1
## build-serve: Build then serve the static ./out folder
build-serve:
npm run build && npx http-server ./out -a $(HOST) -p $(PORT) -c-1