@@ -9,35 +9,43 @@ var addons = {
99 CSSTransitionGroup : {
1010 module : 'ReactCSSTransitionGroup' ,
1111 name : 'css-transition-group' ,
12+ docs : 'animation' ,
1213 } ,
1314 LinkedStateMixin : {
1415 module : 'LinkedStateMixin' ,
1516 name : 'linked-state-mixin' ,
17+ docs : 'two-way-binding-helpers' ,
1618 } ,
1719 Perf : {
1820 module : 'ReactDefaultPerf' ,
1921 name : 'perf' ,
22+ docs : 'perf' ,
2023 } ,
2124 PureRenderMixin : {
2225 module : 'ReactComponentWithPureRenderMixin' ,
2326 name : 'pure-render-mixin' ,
27+ docs : 'pure-render-mixin' ,
2428 } ,
2529 TestUtils : {
2630 module : 'ReactTestUtils' ,
2731 name : 'test-utils' ,
32+ docs : 'test-utils' ,
2833 } ,
2934 TransitionGroup : {
3035 module : 'ReactTransitionGroup' ,
3136 name : 'transition-group' ,
37+ docs : 'animation' ,
3238 } ,
3339 cloneWithProps : {
3440 module : 'cloneWithProps' ,
3541 name : 'clone-with-props' ,
42+ docs : 'clone-with-props' ,
3643 } ,
3744 createFragment : {
3845 module : 'ReactFragment' ,
3946 method : 'create' ,
4047 name : 'create-fragment' ,
48+ docs : 'create-fragment' ,
4149 } ,
4250 shallowCompare : {
4351 module : 'shallowCompare' ,
@@ -46,6 +54,7 @@ var addons = {
4654 updates : {
4755 module : 'update' ,
4856 name : 'update' ,
57+ docs : 'update' ,
4958 } ,
5059} ;
5160
@@ -76,15 +85,20 @@ function buildReleases() {
7685 pkgData . name = pkgName ;
7786
7887 grunt . file . mkdir ( destDir ) ;
88+ var link = info . docs ? info . docs : 'addons' ;
89+ link = `https://facebook.github.io/react/docs/${ link } .html` ;
7990 fs . writeFileSync ( path . join ( destDir , 'index.js' ) , generateSource ( info ) ) ;
8091 fs . writeFileSync ( path . join ( destDir , 'package.json' ) , JSON . stringify ( pkgData , null , 2 ) ) ;
8192 fs . writeFileSync ( path . join ( destDir , 'LICENSE' ) , license ) ;
8293 fs . writeFileSync ( path . join ( destDir , 'PATENTS' ) , patents ) ;
8394 fs . writeFileSync (
8495 path . join ( destDir , 'README.md' ) ,
85- '# ' + pkgName + '\n\n' +
86- 'This package provides the React ' + k + ' add-on. See ' +
87- 'http://facebook.github.io/react/docs/addons.html for more information.\n'
96+ `
97+ # ${ pkgName }
98+
99+ This package provides the React ${ k } add-on.
100+
101+ See <${ link } > for more information.` . slice ( 1 )
88102 ) ;
89103 } ) ;
90104
0 commit comments