-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.sh
More file actions
23 lines (16 loc) · 777 Bytes
/
build.sh
File metadata and controls
23 lines (16 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
nodeLTS=$(curl -sL https://nodejs.org/download/release/index.tab | awk '($10 != "-" && NR != 1) { print $1; exit}')
installedNode=$(node -v)
echo "Node LTS" ${nodeLTS} " vs Installed ${installedNode}"
# TODO: fail build if version is to far outdated
# TODO: run 'npm outdated' to check that packages isn't to out of date
npm audit
ng lint
npx ng build --configuration=production
npx webpack --mode=production
# TODO: this could be expanded to show primary navigaiton vs back navigation plus more.
for r in $(find src/client/app -name "*-routing.module.ts"); do
echo $r; grep "path:\|component:\|loadChildren:" $r;
routeCount=$((routeCount + 1))
done
echo "Total route files:" ${routeCount};
#use --max_semi_space_size=2 --max_old_space_size=256 when running node