-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmake.sh
executable file
·72 lines (53 loc) · 1.88 KB
/
make.sh
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
#
# Top-Level Make the App Do Stuff Script
#
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
BIN_SELF=$(readlink -f "$0")
APP_ROOT=$(dirname "$BIN_SELF")
action="${1:-}"
shift
case "$action" in
# Install or Update the System
install|update)
composer update --no-ansi --no-dev --no-progress --quiet --classmap-authoritative
npm install
./make.sh vendor-web
;;
# Get the CSS and JS Assets
vendor-web)
# lodash
# mkdir -p webroot/vendor/lodash/
# cp node_modules/lodash/lodash.min.js webroot/vendor/lodash/
# jquery
mkdir -p webroot/vendor/jquery/
cp node_modules/jquery/dist/jquery.min.js webroot/vendor/jquery/
cp node_modules/jquery/dist/jquery.min.map webroot/vendor/jquery/
cp node_modules/jquery-ui/dist/jquery-ui.min.js webroot/vendor/jquery/
cp node_modules/jquery-ui/dist/themes/base/jquery-ui.min.css webroot/vendor/jquery/
# bootstrap
mkdir -p webroot/vendor/bootstrap/
cp node_modules/bootstrap/dist/css/bootstrap.min.css webroot/vendor/bootstrap/
cp node_modules/bootstrap/dist/css/bootstrap.min.css.map webroot/vendor/bootstrap/
cp node_modules/bootstrap/dist/js/bootstrap.bundle.min.js webroot/vendor/bootstrap/
cp node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map webroot/vendor/bootstrap/
# htmx
# mkdir -p webroot/vendor/htmx
# cp node_modules/htmx.org/dist/htmx.min.js webroot/vendor/htmx/
# font awesome
mkdir -p webroot/vendor/fontawesome/css webroot/vendor/fontawesome/webfonts
cp node_modules/@fortawesome/fontawesome-free/css/all.min.css webroot/vendor/fontawesome/css/
cp node_modules/@fortawesome/fontawesome-free/webfonts/* webroot/vendor/fontawesome/webfonts/
;;
# Help, the default target
*)
echo
echo "You must supply a make command"
echo
awk '/^# [A-Z].+/ { h=$0 }; /^[a-z]+.+\)/ { printf " \033[0;49;31m%-15s\033[0m%s\n", gensub(/\)$/, "", 1, $$1), h }' "$BIN_SELF" |sort
echo
;;
esac