-
Notifications
You must be signed in to change notification settings - Fork 14
/
wcfactoryme.sh
40 lines (36 loc) · 904 Bytes
/
wcfactoryme.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
#!/bin/bash
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac
install () {
yarn global add symlink-dir
yarn global add @wcfactory/cli
yarn global add polymer-cli
yarn global add lerna
yarn global add web-component-analyzer
yarn global add http-server
}
# make sure node is installed
if ! command -v node;then
echo "Install node and npm first then re-run script"
echo "Go to https://nodejs.org/en/download/ to download and install"
exit
fi
# if yarn isn't installed install it
if ! command -v yarn;then
npm -g install yarn
fi
if [ "${machine}" == "Cygwin" ]; then
git config --global core.autocrlf true
install
elif [ "${machine}" == "MinGw" ]; then
git config --global core.autocrlf true
install
else
install
fi