-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpost-install.sh
executable file
·94 lines (76 loc) · 2.61 KB
/
post-install.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
# node app/models/migrations/v4.js || exit 11;
echo '*************************************************************************'
echo POSTINSTALL
echo '*************************************************************************'
echo '*************************************************************************'
echo Symbolick link
echo '*************************************************************************'
mkdir -p node_modules/syn
# on windows environment make sure /tmp exisits so that stream uploads of pictures will work
mkdir -p /tmp
# always start with a fresh dist directory. If going back a repo, or changing branches in development there may be files there that shouldn't be. Espeically in the app/api
rm -rf dist
# after make install make sure to get the latest polyfill
cp node_modules/@babel/polyfill/dist/polyfill.min.js assets/js
cp node_modules/react-perfect-scrollbar/dist/css/styles.css assets/css
echo '*************************************************************************'
echo BOWER
echo '*************************************************************************'
cd assets || {
echo Could not cd assets;
exit 1
}
bower install || {
echo Could not bower install;
exit 1
}
cd .. || {
echo Could not cd back to root;
exit 1
}
echo "bower ok"
npm run svgr || {
echo Could not svgr
exit 1
}
echo '*************************************************************************'
echo TRANSPILE
echo '*************************************************************************'
npm run transpile || {
echo Could not transpile;
exit 1
}
echo "transpile ok"
echo '*************************************************************************'
echo WEBPACK
echo '*************************************************************************'
npm run packbuild || {
echo Could not webpack;
exit 1
}
echo "webpack ok"
echo '*************************************************************************'
echo LESS TO CSS
echo '*************************************************************************'
npm run less || {
echo Could not convert less to css;
exit 1
}
echo "less ok"
echo '*************************************************************************'
echo MINIFY CSS
echo '*************************************************************************'
npm run min-css || {
echo Could not minify css;
exit 1
}
echo "min-css ok"
echo '*************************************************************************'
echo UGLIFY ASSETS
echo '*************************************************************************'
npm run uglify-assets || {
echo Could not uglify js;
exit 1
}
echo "uglify-assets ok"