Last active
October 31, 2016 21:51
-
-
Save pietvanzoen/70fa8577819388bb70b58d68da469c88 to your computer and use it in GitHub Desktop.
Using Yarn in CircleCI
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
dependencies: | |
pre: | |
- ./install-yarn.sh | |
cache_directories: | |
- ~/.yarn | |
- ~/.yarn-cache | |
override: | |
- yarn install |
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
#!/bin/bash | |
set -ex | |
if [ ! -e ~/.yarn ]; then | |
curl -o- -L https://yarnpkg.com/install.sh | TERM=xterm bash; | |
else | |
echo "Yarn already instgalled"; | |
echo "Adding yarn to .bashrc" | |
if [ -f ~/.bashrc ]; then | |
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> $HOME/.bashrc | |
else | |
echo ".bashrc not found" | |
fi | |
fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment