Skip to content

Commit 01ba51d

Browse files
committed
update package version, webstorm scr refactoring
1 parent a117586 commit 01ba51d

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

package.js

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
var meteorVersion = '1.1.0.2',
2-
reactVersion = '0.13.2'
2+
reactVersion = '0.13.2';
33

44
Package.describe({
5-
name: 'rkstar:reactjs',
6-
summary: 'ReactJS + addons + JSX (--harmony) for Meteor',
7-
version: '0.0.9',
8-
git: 'https://github.com/rkstar/meteor-reactjs'
9-
})
5+
name: 'rkstar:reactjs',
6+
summary: 'ReactJS + addons + JSX (--harmony) for Meteor',
7+
version: '0.0.10',
8+
git: 'https://github.com/rkstar/meteor-reactjs'
9+
});
1010

1111
Package._transitional_registerBuildPlugin({
12-
name: 'compileJSX',
13-
use: [],
14-
sources: [
15-
'plugin/compile-jsx.js'
16-
],
17-
npmDependencies: {
18-
'react': reactVersion,
19-
'react-tools': reactVersion
20-
}
21-
})
12+
name: 'compileJSX',
13+
use: [],
14+
sources: [
15+
'plugin/compile-jsx.js'
16+
],
17+
npmDependencies: {
18+
'react': reactVersion,
19+
'react-tools': reactVersion
20+
}
21+
});
2222

2323

2424
Package.onTest(function (api) {
25-
api.use('tinytest')
26-
api.use('rkstar:reactjs')
27-
api.addFiles('rkstar:reactjs-tests.js')
28-
})
25+
api.use('tinytest');
26+
api.use('rkstar:reactjs');
27+
api.addFiles('rkstar:reactjs-tests.js');
28+
});
2929

3030

3131
Package.on_use(function (api) {
32-
api.versionsFrom(meteorVersion)
32+
api.versionsFrom(meteorVersion);
3333

34-
// Standard distribution of React, same version as react-tools.
35-
api.add_files('vendor/react-' + reactVersion + '.js', 'client')
34+
// Standard distribution of React, same version as react-tools.
35+
api.add_files('vendor/react-' + reactVersion + '.js', 'client');
3636

37-
// On the server, we use the modules that ship with react.
38-
api.add_files('src/require-packages.js', 'server')
39-
api.export('React', 'server')
37+
// On the server, we use the modules that ship with react.
38+
api.add_files('src/require-packages.js', 'server');
39+
api.export('React', 'server');
4040

41-
// Meteor-enabled components should include this mixin via
42-
// React.createClass({ mixins: [ReactMeteor.Mixin], ... }).
43-
api.add_files('src/ReactMeteor.js', ['server', 'client'])
44-
api.export('ReactMeteor', ['server', 'client'])
45-
})
41+
// Meteor-enabled components should include this mixin via
42+
// React.createClass({ mixins: [ReactMeteor.Mixin], ... }).
43+
api.add_files('src/ReactMeteor.js', ['server', 'client']);
44+
api.export('ReactMeteor', ['server', 'client']);
45+
});
4646

4747

4848
Npm.depends({
49-
'react': reactVersion
50-
})
49+
'react': reactVersion
50+
});

src/ReactMeteor.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
var ReactMeteorMixin = {
22
_handleMeteorChange: function () {
3-
if( this.getMeteorState !== undefined ){
3+
if (this.getMeteorState !== undefined) {
44
this.setState(this.getMeteorState())
55
}
66
},
77

8-
_cancelComputation: function(){
9-
if( this._meteorComputation ){
8+
_cancelComputation: function () {
9+
if (this._meteorComputation) {
1010
this._meteorComputation.stop()
1111
this._meteorComputation = null
1212
}
1313
},
1414

15-
componentWillMount: function(){
15+
componentWillMount: function () {
1616
this._meteorComputation = Tracker.autorun(this._handleMeteorChange)
1717
},
1818

19-
componentWillReceiveProps: function( nextProps ){
19+
componentWillReceiveProps: function (nextProps) {
2020
var oldProps = this.props
2121
this.props = nextProps
2222
this._handleMeteorChange()
2323
this.props = oldProps
2424
},
2525

26-
componentWillUnmount: function(){
26+
componentWillUnmount: function () {
2727
this._cancelComputation()
2828
}
2929
}
3030

3131

32-
if( typeof exports === "object" ){
32+
if (typeof exports === "object") {
3333
ReactMeteor = exports
3434
} else {
3535
ReactMeteor = {}

0 commit comments

Comments
 (0)