forked from facebookarchive/react-meteor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.js
35 lines (29 loc) · 905 Bytes
/
package.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Package.describe({
summary: "React rendering for Meteor apps"
});
var reactVersion = "0.12.2";
Npm.depends({
"react": reactVersion,
});
Package._transitional_registerBuildPlugin({
name: "compileJSX",
use: [],
sources: [
'plugin/compile-jsx.js'
],
npmDependencies: {
"react": reactVersion,
"react-tools": reactVersion
}
});
Package.on_use(function(api) {
// Standard distribution of React, same version as react-tools.
api.add_files("vendor/react-" + reactVersion + ".js", "client");
// On the server, we use the modules that ship with react.
api.add_files("src/require-react.js", "server");
api.export("React", "server");
// Meteor-enabled components should include this mixin via
// React.createClass({ mixins: [ReactMeteor.Mixin], ... }).
api.add_files("src/ReactMeteor.js", ["server", "client"]);
api.export("ReactMeteor", ["server", "client"]);
});