Created
November 19, 2016 21:17
-
-
Save niieani/9afcfc6828628127e5dc0994f4dbffb6 to your computer and use it in GitHub Desktop.
Make Aurelia Dev Environment with Yarn
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
#!/usr/bin/env bash | |
repos=( dialog pal-nodejs logging-console vscode-extension cli templating-router templating validation | |
loader-nodejs bootstrapper framework ux templating-resources binding router protractor-plugin loader-webpack | |
pal-browser templating-binding bootstrapper-webpack tools i18n bundler logging testing http-client dependency-injection | |
path app-ux-showcase fetch-client metadata polyfills registry pal-worker loader event-aggregator history history-browser | |
route-recognizer task-queue skeleton-server-render app-contacts web-components animator-velocity ui-virtualization | |
pal loader-default html-import-template-loader documentation cache benchmarks aurelia animator-css typings validatejs | |
html-template-element ) | |
cloneRepo() { | |
repo="$1" | |
echo "pulling aurelia/$repo" | |
url="git@github.com:aurelia/$repo" | |
[[ ! -d "$repo" ]] && git clone "$url" | |
cd "$repo" | |
[[ -f "package.json" ]] && yarn link | |
} | |
for repo in "${repos[@]}" | |
do | |
( | |
cloneRepo "$repo" | |
) | |
done | |
linkRepo() { | |
repo="$1" | |
echo "linking dependencies for aurelia/$repo" | |
cd "$repo" | |
[[ ! -f "package.json" ]] && return | |
dependencies=( $(jq -r ".dependencies? | keys | .[]" package.json) ) | |
for dependency in "${dependencies[@]}" | |
do | |
echo "linking dependency $dependency" | |
yarn link "$dependency" | |
done | |
# install other dependencies | |
yarn | |
} | |
for repo in "${repos[@]}" | |
do | |
( | |
linkRepo "$repo" | |
) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment