Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
add quick install script and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
collinkleest committed Apr 26, 2021
1 parent 3547ddb commit c4dc16b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ A factory that churns out web components, library agnostic with a unified develo

[Here's a video showing what this is and how it works](https://www.youtube.com/playlist?list=PLJQupiji7J5cAv7Jfr1V8FvUTx_jJrmCl).

### Install
### Quick Install
```bash
curl -fsSL https://raw.githubusercontent.com/elmsln/WCFactory/master/wcfactoryme.sh -o wcfactoryme.sh && sh wcfactoryme.sh
```

### Manual Install

Make sure you have a version of node v14.16.1 and above.
Verify that you have yarn enabled — if not [install yarn](https://yarnpkg.com/lang/en/docs/install/) and ensure it is [globally available via PATH](https://yarnpkg.com/lang/en/docs/cli/global/). If using Linux, make sure you add `--prefix /usr/local` at the end of each of these calls
Expand All @@ -26,6 +31,7 @@ $ yarn global add http-server

### Windows Install

Make sure a path entry to yarn global binaries is present or `wcf` will fail. Yarn global binaries can be found in `C:\Users\<username>\AppData\Local\Yarn\bin`
To properly configure git endlines for Windows, run this configuration
```bash
$ git config --global core.autocrlf true
Expand Down
40 changes: 40 additions & 0 deletions wcfactoryme.sh
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

0 comments on commit c4dc16b

Please sign in to comment.