File tree Expand file tree Collapse file tree 3 files changed +20
-10
lines changed Expand file tree Collapse file tree 3 files changed +20
-10
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"stage" : 0 ,
3
+ "loose" : " all" ,
3
4
"plugins" : [ " object-assign" ]
4
5
}
Original file line number Diff line number Diff line change 10
10
"homepage" : " https://rackt.github.io/react-router/" ,
11
11
"bugs" : " https://github.com/rackt/react-router/issues" ,
12
12
"scripts" : {
13
- "build" : " scripts/build.sh" ,
13
+ "build" : " babel ./modules -d lib --ignore '__tests__'" ,
14
+ "build-umd" : " NODE_ENV=production webpack modules/index.js lib/umd/History.js" ,
15
+ "build-min" : " NODE_ENV=production webpack -p modules/index.js lib/umd/History.min.js" ,
14
16
"build-website" : " scripts/build-website.sh" ,
15
- "prepublish" : " npm run build" ,
16
17
"examples" : " webpack-dev-server --config examples/webpack.config.js --content-base examples --inline" ,
17
- "test" : " eslint modules && karma start"
18
+ "test" : " eslint modules && karma start" ,
19
+ "prepublish" : " npm run build"
18
20
},
19
21
"authors" : [
20
22
" Ryan Florence" ,
Original file line number Diff line number Diff line change @@ -7,15 +7,19 @@ update_version() {
7
7
echo " Updated ${1} version to ${2} "
8
8
}
9
9
10
+ validate_semver () {
11
+ if ! [[ $1 =~ ^[0-9]\. [0-9]+\. [0-9](-.+)? ]]; then
12
+ echo " Version $1 is not valid! It must be a valid semver string like 1.0.2 or 2.3.0-beta.1"
13
+ exit 1
14
+ fi
15
+ }
16
+
10
17
current_version=$( node -p " require('./package').version" )
11
18
12
19
printf " Next version (current is $current_version )? "
13
20
read next_version
14
21
15
- if ! [[ $next_version =~ ^[0-9]\. [0-9]+\. [0-9](-.+)? ]]; then
16
- echo " Version must be a valid semver string, e.g. 1.0.2 or 2.3.0-beta.1"
17
- exit 1
18
- fi
22
+ validate_semver $next_version
19
23
20
24
next_ref=" v$next_version "
21
25
@@ -26,8 +30,12 @@ update_version 'package.json' $next_version
26
30
$changelog -t $next_ref
27
31
28
32
npm run build
29
- git add -A build
33
+ npm run build-umd
34
+ npm run build-min
30
35
36
+ echo " gzipped, the UMD build is ` gzip -c lib/umd/ReactRouter.min.js | wc -c | sed -e ' s/^[[:space:]]*//' ` bytes"
37
+
38
+ git add -A build
31
39
git commit -am " Version $next_version "
32
40
33
41
git tag $next_ref
@@ -37,8 +45,7 @@ git push origin master
37
45
git push origin $next_ref
38
46
git push origin latest -f
39
47
40
- npm publish build
48
+ npm publish
41
49
42
50
echo " # Publishing docs website"
43
51
./publish-docs.sh
44
-
You can’t perform that action at this time.
0 commit comments