Skip to content

Instantly share code, notes, and snippets.

@carlbennettnz
Last active April 12, 2017 12:04
Show Gist options
  • Save carlbennettnz/d712605be4e7922d6bc956bc4d239630 to your computer and use it in GitHub Desktop.
Save carlbennettnz/d712605be4e7922d6bc956bc4d239630 to your computer and use it in GitHub Desktop.
function fix-ec-dev-deps {
cd node_modules/ember-cli
npm i
cd ../..
}
function clear-cache {
rm -r tmp $TMPDIR/if-you-need-to-delete-this-open-an-issue-async-disk-cache/
}
mkdir -p viz
clear-cache
# 2.9 Just For Cache Warming
npm i --save-dev ember-cli@2.9
ember serve
# 2.10 Fresh Install
npm i --save-dev ember-cli@2.10
if [[ $1 == viz ]]; then
fix-ec-dev-deps
echo '2.10 fresh install with viz'
BROCCOLI_VIZ=1 ember serve
mv broccoli-viz.0.json viz/ec-2-10-fresh-install.json
else
echo '2.10 fresh install without viz'
ember serve
fi
# 2.10 Without Cache
clear-cache
if [[ $1 == viz ]]; then
echo '2.10 without cache and with viz'
BROCCOLI_VIZ=1 ember serve
mv broccoli-viz.0.json viz/ec-2-10-without-cache.json
else
echo '2.10 without cache or viz'
ember serve
fi
# 2.10 With Cache
if [[ $1 == viz ]]; then
echo '2.10 with cache and viz'
BROCCOLI_VIZ=1 ember serve
mv broccoli-viz.0.json viz/ec-2-10-with-cache.json
else
echo '2.10 with cache and without viz'
ember serve
fi
# 2.11 Fresh Install
npm i --save-dev ember-cli@2.11
if [[ $1 == viz ]]; then
fix-ec-dev-deps
echo '2.11 fresh install with viz'
BROCCOLI_VIZ=1 ember serve
mv broccoli-viz.0.json viz/ec-2-11-fresh-install.json
else
echo '2.11 fresh install without viz'
ember serve
fi
# 2.11 Without Cache
clear-cache
if [[ $1 == viz ]]; then
echo '2.11 without cache and with viz'
BROCCOLI_VIZ=1 ember serve
mv broccoli-viz.0.json viz/ec-2-11-without-cache.json
else
echo '2.11 without cache or viz'
ember serve
fi
# 2.11 With Cache
if [[ $1 == viz ]]; then
echo '2.11 with cache and viz'
BROCCOLI_VIZ=1 ember serve
mv broccoli-viz.0.json viz/ec-2-11-with-cache.json
else
echo '2.11 with cache and without viz'
ember serve
fi
# 2.12 Fresh Install
npm i --save-dev ember-cli@beta
if [[ $1 == viz ]]; then
fix-ec-dev-deps
echo '2.12 fresh install with viz'
BROCCOLI_VIZ=1 ember serve
mv instrumentation.build.0.json viz/ec-2-12-build-fresh-install.json
mv instrumentation.init.json viz/ec-2-12-init-fresh-install.json
else
echo '2.12 fresh install without viz'
ember serve
fi
# 2.12 Without Cache
clear-cache
if [[ $1 == viz ]]; then
echo '2.12 without cache and with viz'
BROCCOLI_VIZ=1 ember serve
mv instrumentation.build.0.json viz/ec-2-12-build-without-cache.json
mv instrumentation.init.json viz/ec-2-12-init-without-cache.json
else
echo '2.12 without cache or viz'
ember serve
fi
# 2.12 With Cache
if [[ $1 == viz ]]; then
echo '2.12 with cache and viz'
BROCCOLI_VIZ=1 ember serve
mv instrumentation.build.0.json viz/ec-2-12-build-with-cache.json
mv instrumentation.init.json viz/ec-2-12-init-with-cache.json
else
echo '2.12 with cache and without viz'
ember serve
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment