This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add quick install script and update readme
- Loading branch information
1 parent
3547ddb
commit c4dc16b
Showing
2 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |