Skip to content

Instantly share code, notes, and snippets.

@niieani
Created November 19, 2016 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niieani/9afcfc6828628127e5dc0994f4dbffb6 to your computer and use it in GitHub Desktop.
Save niieani/9afcfc6828628127e5dc0994f4dbffb6 to your computer and use it in GitHub Desktop.
Make Aurelia Dev Environment with Yarn
#!/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