-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile.unx
44 lines (40 loc) · 1.49 KB
/
makefile.unx
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
all: clean run
clean:
./terminate
rm -rf dist
content:
cp assets/index.html dist/public
cp -R assets/img dist/public
cd assets/scss && sass --style compressed app.sass ../css/app.css
cp -R assets/css dist/public
cp -R assets/fonts dist/public
temple build templates app/template.go
cd app && gopherjs build *.go -o ../dist/public/app.js
dist: assets
##### 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
cd assets/scss && node-sass app.sass ../css/app.css
cp -R assets/css dist/public
cp -R assets/fonts dist/public
cp -R assets/js dist/public
cp bower_components/normalize.css/normalize.css dist/public/css
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
mplayer -quiet audio/alldone.ogg 2> /dev/null > /dev/null &
##### Building Server App
cd server && go build -o ../dist/cmms-server
mplayer -quiet audio/camera.oga 2> /dev/null > /dev/null &
##### 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