forked from EOSBetCasino/EOSBet.IO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·40 lines (27 loc) · 826 Bytes
/
build.sh
File metadata and controls
executable file
·40 lines (27 loc) · 826 Bytes
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
#!/bin/bash
# make build directory
mkdir -p build
# remove current build files
rm -rf build/*
# make directories in build folder
mkdir build/js && mkdir build/css && mkdir build/abi && mkdir build/img
# minify html
for filename in *.html; do
npx html-minifier --collapse-whitespace --remove-comments --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype $filename -o build/$filename
done
echo "Built html!"
# minify css
for filename in css/*.css; do
npx csso $filename build/$filename
done
echo "Built css!"
# minify js and overwrite transpiled js
for filename in js/*.js; do
npx uglifyjs -o build/$filename -- $filename
done
echo "Built js!"
# copy over images and ABI's
cp -r img/* build/img
cp -r abi/* build/abi
cp -r *.pdf build
echo "Build complete!"