forked from steveoc64/go-cmms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.win
45 lines (41 loc) · 1.57 KB
/
makefile.win
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
all: clean run
clean:
terminate.bat
rm -rf dist server/cmms
content:
cp assets/index.html dist/public
cp -R assets/img dist/public
cp -R assets/css dist/public
temple build templates app/template.go
cd app && gopherjs build *.go -o ../dist/public/app.js
dist:
##### Clean Out Dist Directory
rm -rf dist
mkdir -p dist/public
mkdir -p dist/public/css dist/public/font dist/public/js
##### Copy Our Assets
cp assets/index.html dist/public
cp -R assets/img dist/public
# cp -R assets/fonts dist/public
cp -R assets/css dist/public
cp -R assets/js dist/public
##### Copy 3rd Party Assets
cp bower_components/Materialize/dist/css/materialize.css dist/public/css
cp bower_components/Materialize/dist/js/materialize.js dist/public/js
cp bower_components/jquery/dist/jquery.js dist/public/js
cp -R bower_components/Materialize/dist/font dist/public
cp server/config.json dist
##### Building Client App
temple build templates app/template.go --package main
cd app && gopherjs build *.go -o ../dist/public/app.js -m
# cd app && gopherjs build *.go -o ../dist/public/app.js -m
##### Building Server App
cd server && go build -o ../dist/cmms-server.exe
#cd server && go build -o ../dist/cmms-server
##### Dist directory looks like this
cd dist && ls -l && ls -l public/app.js && du -k .
run: dist
###################################################################################################
# !!! All code passed compile and build stage !!!
###################################################################################################
cd dist && ./cmms-server