-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
executable file
·50 lines (34 loc) · 851 Bytes
/
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
include .env
VIM := nvim
PROGRAM := npm
RM := rm -rf
MK := mkdir
CP := cp
ZIP := zip
ZIP_FOLDER := _v$(VERSION)
ENV_DEV := NODE_ENV=development
ENV_PROD := NODE_ENV=production
URL_DOC := https://ja.player.support.brightcove.com/getting-started/index.html
all: bookmark serve
build: clean prod
install:
$(PROGRAM) install
bookmark:
open '$(URL_DOC)'
editor:
$(VIM) './'
clean:
$(RM) dist
serve:
$(ENV_DEV) $(PROGRAM) run dev
prod:
$(ENV_PROD) $(PROGRAM) run prod
test:
@echo $(TYPE)
zip:
$(RM) $(ZIP_FOLDER)$(TYPE)
$(MK) $(ZIP_FOLDER)$(TYPE)
$(CP) dist/js-player-module-brightcove.js examples/index.html $(ZIP_FOLDER)$(TYPE)/
sed -i "" "s/..\/dist\//.\//g" "$(ZIP_FOLDER)$(TYPE)/index.html"
$(ZIP) $(ZIP_FOLDER)$(TYPE)/$(VERSION).zip -r $(ZIP_FOLDER)$(TYPE)/*
.PHONY: all build bookmark editor serve clean prod zip install