From 3a154af8623992a834e557ea9172ff38fd6b1144 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 1 Jul 2024 16:02:59 +0200 Subject: Makefile: reorder recipes --- DEVELOPMENT.md | 3 +-- Makefile | 27 ++++++++++++--------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 4dba83f..b42d409 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -41,9 +41,8 @@ Upgrading dependencies * Manually upgrade Node.js dependencies: - make npm npm update - make bundle + make browserify Building static pages --------------------- diff --git a/Makefile b/Makefile index f0eea16..e3cb547 100644 --- a/Makefile +++ b/Makefile @@ -13,22 +13,19 @@ ruby: .PHONY: deps deps: ruby bundle install - -.PHONY: npm -npm: npm install -jekyll := bundle exec jekyll +.PHONY: browserify +browserify: assets/js/bundle.js -.PHONY: build -build: - $(jekyll) build +assets/js/bundle.js: package-lock.json + npm exec -- browserify --require ip-address --outfile '$(call escape,$@)' .PHONY: maintenance -maintenance: ruby npm +maintenance: ruby bundle update npm update - @$(MAKE) bundle + @$(MAKE) browserify @git_status="$$( git status --porcelain=v1 )" && \ if [ -z "$$git_status" ]; then \ @@ -45,6 +42,12 @@ maintenance: ruby npm exit 1; \ fi +jekyll := bundle exec jekyll + +.PHONY: build +build: + $(jekyll) build + .PHONY: serve serve: ifeq ($(LIVE_RELOAD),1) @@ -63,12 +66,6 @@ wget: view: xdg-open '$(call escape,$(URL))' &> /dev/null -.PHONY: bundle -bundle: assets/js/bundle.js - -assets/js/bundle.js: package-lock.json - npm exec -- browserify --require ip-address --outfile '$(call escape,$@)' - REMOTE_USER ?= who REMOTE_HOST ?= where REMOTE_PORT ?= 22 -- cgit v1.2.3