-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_dependencies.sh
51 lines (39 loc) · 1.05 KB
/
install_dependencies.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
#!/bin/bash
function installPackage() {
local packageName=$1
echo "Installing package: ${packageName}"
# Check if package is already installed
npm list -g $packageName &>/dev/null
# Install if not already installed
if [ "$?" -ne "0" ]; then
npm install -g $packageName
if [ "$?" -ne "0" ]; then
echo "Error installing package: '${packageName}'"
exit 1
fi
echo "Installed '${packageName}'!"
else
# Otherwise don't
echo "Package '${packageName}' already installed."
fi
echo
}
function beginSection() {
echo $1
echo "-----------------------------------------"
echo
}
beginSection "Installing project global dependencies..."
installPackage "less"
installPackage "typescript@1.4.1"
installPackage "tsd@next"
installPackage "karma-cli"
installPackage "jake"
installPackage "bower"
beginSection "Fetching TypeScript Library Definitions..."
tsd reinstall
beginSection "Installing Bower depenendencies..."
bower install
beginSection "Compiling Jake Scripts..."
tsc=${APPDATA}/npm/tsc
${tsc} --target ES5 --module CommonJS JakeFile.ts