2020-09-17 13:35:38 -05:00
|
|
|
HUGO ?= hugo
|
|
|
|
DEV_SERVE ?= serve --buildDrafts --buildFuture --buildExpired
|
|
|
|
NETLIFY_DEPLOY ?= deploy -d public
|
|
|
|
|
|
|
|
.PHONY: all
|
2020-07-14 16:51:25 -05:00
|
|
|
all: build
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: build
|
2020-12-15 17:29:49 -06:00
|
|
|
build: themes/lyte/static/styles.css ; @${HUGO}
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: public
|
|
|
|
public: build
|
|
|
|
|
|
|
|
.PHONY: dev
|
2020-12-15 17:29:49 -06:00
|
|
|
dev:
|
|
|
|
@stylus -w themes/lyte/styles.styl --sourcemap -o themes/lyte/static/styles.css &
|
|
|
|
@${HUGO} ${DEV_SERVE}
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: dev-ext
|
|
|
|
dev-ext: ; @${HUGO} ${DEV_SERVE} --bind 0.0.0.0
|
|
|
|
|
|
|
|
.PHONY: clean
|
2020-07-14 18:02:25 -05:00
|
|
|
clean: ; @rm -r public
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: publish
|
2020-12-15 17:29:49 -06:00
|
|
|
publish: clean-css public ; @netlify ${NETLIFY_DEPLOY} && echo "Run \`make publish-prod\` when ready."
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: publish-prod
|
2020-12-15 17:29:49 -06:00
|
|
|
publish-prod: clean-css public ; @netlify ${NETLIFY_DEPLOY} --prod
|
|
|
|
|
|
|
|
themes/lyte/static/styles.css: themes/lyte/styles.styl $(shell find ./themes/lyte -regex ".*\.styl")
|
|
|
|
stylus --compress $< -o $@
|
|
|
|
|
|
|
|
.PHONY: clean-css
|
|
|
|
clean-css: ; rm -f themes/lyte/static/styles.css
|