The library for web and native user interfaces.
Revert "Merge pull request #200 from spicyj/version"
This reverts commit d8893228275cacc65a8632c7416bb023ab4c946f, reversing changes made to 156dffb961ab15f577e0a6aab1abc5efd68f9a9b.
Paul O’Shannessy committed
Jul 17, 2013 at 08:26 UTC
c629a0c5ad1adc82e01a982e7116eae632fa8d65
7 files changed
+24
-41
grunt/config/jsx/debug.json
new
+6
@@ -0,0 +1,6 @@
1
+{
2
+ "debug": true,
3
+ "constants": {
4
+ "__DEV__": true
5
+ }
6
+}
grunt/config/jsx/jsx.js
+4
-35
@@ -1,24 +1,12 @@
1
'use strict';
2
3
-var grunt = require('grunt');
4
-
3
var rootIDs = [
4
"React"
5
];
6
9
-var getDebugConfig = function() {
10
- return {
11
- "debug": true,
12
- "constants": {
13
- "__VERSION__": grunt.config.data.pkg.version,
14
- "__DEV__": true
15
- }
16
- };
17
-};
18
-
7
var debug = {
8
rootIDs: rootIDs,
21
- getConfig: getDebugConfig,
9
+ configFile: "grunt/config/jsx/debug.json",
10
sourceDir: "src",
11
outputDir: "build/modules"
12
};
@@ -27,7 +15,7 @@ var jasmine = {
15
rootIDs: [
16
"all"
17
],
30
- getConfig: getDebugConfig,
18
+ configFile: debug.configFile,
19
sourceDir: "vendor/jasmine",
20
outputDir: "build/jasmine"
21
};
@@ -37,37 +25,18 @@ var test = {
25
"test/all.js",
26
"**/__tests__/*.js"
27
]),
40
- getConfig: function() {
41
- return {
42
- "debug": true,
43
- "mocking": true,
44
- "constants": {
45
- "__VERSION__": grunt.config.data.pkg.version,
46
- "__DEV__": true
47
- }
48
- };
49
- },
28
+ configFile: "grunt/config/jsx/test.json",
29
sourceDir: "src",
30
outputDir: "build/modules"
31
};
32
54
-
33
var release = {
34
rootIDs: rootIDs,
57
- getConfig: function() {
58
- return {
59
- "debug": false,
60
- "constants": {
61
- "__VERSION__": grunt.config.data.pkg.version,
62
- "__DEV__": false
63
- }
64
- };
65
- },
35
+ configFile: "grunt/config/jsx/release.json",
36
sourceDir: "src",
37
outputDir: "build/modules"
38
};
39
70
-
40
module.exports = {
41
debug: debug,
42
jasmine: jasmine,
grunt/config/jsx/release.json
new
+6
@@ -0,0 +1,6 @@
1
+{
2
+ "debug": false,
3
+ "constants": {
4
+ "__DEV__": false
5
+ }
6
+}
grunt/config/jsx/test.json
new
+7
@@ -0,0 +1,7 @@
1
+{
2
+ "debug": true,
3
+ "mocking": true,
4
+ "constants": {
5
+ "__DEV__": true
6
+ }
7
+}
grunt/tasks/jsx.js
+1
-4
@@ -24,7 +24,7 @@ module.exports = function() {
24
});
25
26
args.push.apply(args, rootIDs);
27
- args.push("--config" /* from stdin */);
27
+ args.push("--config", config.configFile);
28
29
var child = spawn({
30
cmd: "bin/jsx",
@@ -38,9 +38,6 @@ module.exports = function() {
38
}
39
});
40
41
- child.stdin.write(JSON.stringify(config.getConfig()));
42
- child.stdin.end();
43
-
41
child.stdout.pipe(process.stdout);
42
child.stderr.pipe(process.stderr);
43
};
src/.jshintrc
-1
@@ -19,7 +19,6 @@
19
"unused": "vars",
20
21
"globals": {
22
- "__VERSION__": false,
22
"__DEV__": false,
23
"require": false,
24
"module": false,
src/core/React.js
-1
@@ -30,7 +30,6 @@ var ReactDefaultInjection = require('ReactDefaultInjection');
30
ReactDefaultInjection.inject();
31
32
var React = {
33
- version: __VERSION__,
33
DOM: ReactDOM,
34
PropTypes: ReactPropTypes,
35
initializeTouchEvents: function(shouldUseTouch) {