From 1b9f9e63d603e98e80ce8b921e37a8a8cf64b9a6 Mon Sep 17 00:00:00 2001
From: Ray Schamp <ray@scratch.mit.edu>
Date: Tue, 18 Oct 2016 11:58:16 -0400
Subject: [PATCH] Fix scratch-* dependency versions for npm update

The issues:
* The scratch-blocks@0.1.0 version exists because I accidentally published 0.1.0 (no -prerelease modifier) while setting up NPM
* I added a step that causes Travis to run `npm update` after installing
* The "0.1.0-prepublish" dependency version makes no sense

This made Travis install the old version of scratch-blocks that I published accidentally, which breaks the playground.
---
 .travis.yml  | 2 +-
 package.json | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e8ff890b4..0d44141d7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,5 +31,5 @@ after_script:
     # Publish to gh-pages as most recent committer
     git config --global user.email $(git log --pretty=format:"%ae" -n1)
     git config --global user.name $(git log --pretty=format:"%an" -n1)
-    ./node_modules/.bin/gh-pages -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git -d playground -m "Build for $(git log --pretty=format:%H -n1)"
+    npm run deploy -- -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
   fi
diff --git a/package.json b/package.json
index abee4ac4e..9d6bd11d4 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
   "scripts": {
     "build": "./node_modules/.bin/webpack --progress --colors --bail",
     "coverage": "./node_modules/.bin/tap ./test/{unit,integration}/*.js --coverage --coverage-report=lcov",
+    "deploy": "./node_modules/.bin/gh-pages -d playground -m \"Build for $(git log --pretty=format:%H -n1)\"",
     "lint": "./node_modules/.bin/eslint .",
     "prepublish": "npm run build",
     "prepublish-watch": "npm run watch",
@@ -34,8 +35,8 @@
     "json-loader": "0.5.4",
     "lodash.defaultsdeep": "4.6.0",
     "promise": "7.1.1",
-    "scratch-blocks": "^0.1.0-prepublish",
-    "scratch-render": "^0.1.0-prepublish",
+    "scratch-blocks": "latest",
+    "scratch-render": "latest",
     "script-loader": "0.7.0",
     "stats.js": "0.16.0",
     "tap": "5.7.1",