forked from pytorch/pytorch.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (33 loc) · 1.01 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
34
35
36
37
38
39
40
41
42
43
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)
cp node_modules/anchor-js/anchor.min.js $(VENDOR_DIR)
build: install include-yarn-deps
$(JEKYLL) build --config _config.yml
serve: install include-yarn-deps
JEKYLL_ENV=development $(JEKYLL) serve --incremental --config _config.yml
build_deploy: include-yarn-deps
JEKYLL_ENV=production $(JEKYLL) build