Skip to content

Commit

Permalink
[fixed] Installing on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mjackson committed Aug 13, 2015
1 parent 7c1edc6 commit 4c6dc1b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"stage": 0,
"loose": "all",
"plugins": [ "object-assign" ]
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"homepage": "https://rackt.github.io/react-router/",
"bugs": "https://github.com/rackt/react-router/issues",
"scripts": {
"build": "scripts/build.sh",
"build": "babel ./modules -d lib --ignore '__tests__'",
"build-umd": "NODE_ENV=production webpack modules/index.js lib/umd/History.js",
"build-min": "NODE_ENV=production webpack -p modules/index.js lib/umd/History.min.js",
"build-website": "scripts/build-website.sh",
"prepublish": "npm run build",
"examples": "webpack-dev-server --config examples/webpack.config.js --content-base examples --inline",
"test": "eslint modules && karma start"
"test": "eslint modules && karma start",
"prepublish": "npm run build"
},
"authors": [
"Ryan Florence",
Expand Down
21 changes: 14 additions & 7 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ update_version() {
echo "Updated ${1} version to ${2}"
}

validate_semver() {
if ! [[ $1 =~ ^[0-9]\.[0-9]+\.[0-9](-.+)? ]]; then
echo "Version $1 is not valid! It must be a valid semver string like 1.0.2 or 2.3.0-beta.1"
exit 1
fi
}

current_version=$(node -p "require('./package').version")

printf "Next version (current is $current_version)? "
read next_version

if ! [[ $next_version =~ ^[0-9]\.[0-9]+\.[0-9](-.+)? ]]; then
echo "Version must be a valid semver string, e.g. 1.0.2 or 2.3.0-beta.1"
exit 1
fi
validate_semver $next_version

next_ref="v$next_version"

Expand All @@ -26,8 +30,12 @@ update_version 'package.json' $next_version
$changelog -t $next_ref

npm run build
git add -A build
npm run build-umd
npm run build-min

echo "gzipped, the UMD build is `gzip -c lib/umd/ReactRouter.min.js | wc -c | sed -e 's/^[[:space:]]*//'` bytes"

git add -A build
git commit -am "Version $next_version"

git tag $next_ref
Expand All @@ -37,8 +45,7 @@ git push origin master
git push origin $next_ref
git push origin latest -f

npm publish build
npm publish

echo "# Publishing docs website"
./publish-docs.sh

0 comments on commit 4c6dc1b

Please sign in to comment.