-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
33 lines (25 loc) · 1.07 KB
/
Makefile
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
32
33
YARN?=yarn
PELICANOPTS=-t mytheme
BASEDIR=$(CURDIR)
OUTPUTDIR=output
OUTPUTDIR_PATH=$(BASEDIR)/$(OUTPUTDIR)
PORT?=8000
SITEURL?=http://localhost:$(PORT)
help:
@echo 'Makefile for a nextjs Web site '
@echo ' '
@echo 'Usage: '
@echo ' make html (re)generate the web site '
@echo ' make clean remove the generated files '
@echo ' make serve [PORT=8000] starts the application in production mode. '
@echo ' make devserver [PORT=8000] starts the application in development mode.'
@echo ''
html:
OUTPUTDIR=$(OUTPUTDIR) SITEURL=$(SITEURL) $(YARN) build
clean:
[ ! -d $(OUTPUTDIR_PATH) ] || rm -rf $(OUTPUTDIR_PATH)
serve:
SITEURL=$(SITEURL) $(YARN) start -p $(PORT)
devserver:
SITEURL=$(SITEURL) $(YARN) dev -p $(PORT)
.PHONY: html help clean serve devserver