-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·35 lines (28 loc) · 876 Bytes
/
build.sh
File metadata and controls
executable file
·35 lines (28 loc) · 876 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
#!/bin/bash
echo "============================" && \
echo "Let's build this thing then!" && \
echo "============================" && \
echo "" && \
echo "1. Elm" && \
elm package install -y && \
echo "2. npm" && \
npm install && \
echo "3. bower" && \
bower install && \
echo "4. Run the build" && \
NODE_ENV=production npm run build && \
echo "5. Run the imports through minification" && \
mkdir -p tmp && \
cp dist/imports.html dist/imports.js tmp && \
echo " a) HTML" && \
./node_modules/html-minifier/cli.js \
-c ./config/html-minifier.json \
./tmp/imports.html -o ./dist/imports.html
echo " b) JS" && \
./node_modules/.bin/uglifyjs \
--compress --mangle -o ./dist/imports.js \
./tmp/imports.js && \
echo "============================" && \
echo "All done! " && \
echo "============================" && \
echo ""