forked from GMOD/jbrowse-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (40 loc) · 1.57 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
44
45
46
47
48
49
50
51
52
.PHONY: build help lint all run deploy
NPM:=$(shell which npm)
YARN:=$(shell which yarn)
installer = $(NPM)
ifdef YARN
installer = $(YARN)
endif
all: run
run: node_modules js/plugins.json ## Run the server
@echo "********************************"
@echo "* open http://localhost:8000/ *"
@echo "********************************"
./node_modules/.bin/webpack-dev-server --progress --colors --devtool cheap-module-inline-source-map --hot --debug --inline --host 127.0.0.1 --port 8000
run_prod: node_modules js/plugins.json ## Run the server
@echo "********************************"
@echo "* open http://localhost:8000/ *"
@echo "********************************"
./node_modules/.bin/webpack-dev-server --progress --colors --devtool source-map --optimize-minimize --optimize-dedupe --host 127.0.0.1 --port 8000
build: node_modules js/plugins.json ## Compile a project for deployment
./node_modules/.bin/webpack --progress --colors --devtool source-map --optimize-minimize --optimize-dedupe
deploy:
# Prepare release area
@rm -rf release
@mkdir release
# Load required data
@cp -Rv index.html build partials img demos .nojekyll release
# Build
@$(MAKE) build
# Push
./node_modules/.bin/gh-pages -t -d release/ --repo [email protected]:gmod/jbrowse-registry.git
# Cleanup
@rm -rf release
node_modules: package.json
$(installer) install
js/plugins.json: node_modules plugins.yaml
node scripts/prepare_api.js > $@
lint:
node scripts/lint.js
help:
@egrep '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'