Skip to content

Instantly share code, notes, and snippets.

@funraise-af
Forked from marcanuy/Makefile
Last active August 2, 2018 18:08
Show Gist options
  • Save funraise-af/fca753f07a253d70d998970433db9da0 to your computer and use it in GitHub Desktop.
Save funraise-af/fca753f07a253d70d998970433db9da0 to your computer and use it in GitHub Desktop.
SHELL := /bin/bash
YARN := yarn
VENDOR_DIR = assets/vendor/
JEKYLL := jekyll
PROJECT_DEPS := package.json
.PHONY: all clean install update
all : serve
check:
$(JEKYLL) doctor
$(HTMLPROOF) --check-html \
--http-status-ignore 999 \
--internal-domains localhost:4000 \
--assume-extension \
_site
install: $(PROJECT_DEPS)
$(YARN) install
update: $(PROJECT_DEPS)
$(YARN) upgrade
include-yarn-deps:
mkdir -p $(VENDOR_DIR)
cp node_modules/jquery/dist/jquery.min.js $(VENDOR_DIR)
cp node_modules/popper.js/dist/umd/popper.min.js $(VENDOR_DIR)
cp node_modules/bootstrap/dist/js/bootstrap.min.js $(VENDOR_DIR)
build: install include-yarn-deps
$(JEKYLL) build
serve: install include-yarn-deps
JEKYLL_ENV=production $(JEKYLL) serve
SHELL := /bin/bash
BUNDLE := bundle
YARN := yarn
VENDOR_DIR = assets/vendor/
JEKYLL := $(BUNDLE) exec jekyll
PROJECT_DEPS := Gemfile package.json
.PHONY: all clean install update
all : serve
check:
$(JEKYLL) doctor
$(HTMLPROOF) --check-html \
--http-status-ignore 999 \
--internal-domains localhost:4000 \
--assume-extension \
_site
install: $(PROJECT_DEPS)
$(BUNDLE) install --path vendor/bundler
$(YARN) install
update: $(PROJECT_DEPS)
$(BUNDLE) update
$(YARN) upgrade
include-yarn-deps:
mkdir -p $(VENDOR_DIR)
cp node_modules/jquery/dist/jquery.min.js $(VENDOR_DIR)
cp node_modules/popper.js/dist/umd/popper.min.js $(VENDOR_DIR)
cp node_modules/bootstrap/dist/js/bootstrap.min.js $(VENDOR_DIR)
build: install include-yarn-deps
$(JEKYLL) build
serve: install include-yarn-deps
JEKYLL_ENV=production $(JEKYLL) serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment