Skip to content

Commit d982d5e

Browse files
committed
Move react-tools from root.
ReactTools is deprecated, it doesn't belong at the root of the project. We'll remove it after 0.14 but for now this moves it so that it's contained and not intermixed with the rest of the project. The currect behavior of copying src/ into the package is maintained.
1 parent cc98f83 commit d982d5e

File tree

6 files changed

+41
-46
lines changed

6 files changed

+41
-46
lines changed

grunt/tasks/npm-react-tools.js

+5-13
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,21 @@ var fs = require('fs');
44
var grunt = require('grunt');
55

66
var src = 'npm-react-tools';
7+
var srcSrc = 'src/**/*.js';
78
var dest = 'build/npm-react-tools/';
89

910
function buildRelease() {
1011
if (grunt.file.exists(dest)) {
1112
grunt.file.delete(dest);
1213
}
1314

14-
// read our required files from package.json
15-
var pkgFiles = grunt.config.data.pkg.files;
16-
1715
// copy all files from src first, includes custom README
1816
var mappings = grunt.file.expandMapping('**/*', dest, {cwd: src});
1917

20-
// make sure we also get package.json
21-
pkgFiles.push('package.json');
22-
23-
pkgFiles.map(function(file) {
24-
if (grunt.file.isDir(file)) {
25-
mappings = mappings.concat(grunt.file.expandMapping(file + '**/*', dest));
26-
} else {
27-
mappings.push({src: [file], dest: dest + file});
28-
}
29-
});
18+
// Also copy all files from src/ (for react-native)
19+
mappings = mappings.concat(
20+
grunt.file.expandMapping(srcSrc, dest)
21+
);
3022

3123
mappings.forEach(function(mapping) {
3224
var mappingSrc = mapping.src[0];

bin/jsx npm-react-tools/bin/jsx

File renamed without changes.

main.js npm-react-tools/main.js

File renamed without changes.

npm-react-tools/package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "react-tools",
3+
"description": "A set of complementary tools to React, including the JSX transformer.",
4+
"version": "0.14.0-alpha3",
5+
"keywords": [
6+
"react",
7+
"jsx",
8+
"transformer",
9+
"view"
10+
],
11+
"homepage": "https://facebook.github.io/react",
12+
"bugs": "https://github.com/facebook/react/issues",
13+
"license": "BSD-3-Clause",
14+
"files": [
15+
"main.js",
16+
"bin/jsx",
17+
"src/"
18+
],
19+
"main": "main.js",
20+
"bin": {
21+
"jsx": "./bin/jsx"
22+
},
23+
"repository": "facebook/react",
24+
"dependencies": {
25+
"commoner": "^0.10.0",
26+
"jstransform": "^11.0.0"
27+
},
28+
"engines": {
29+
"node": ">=0.10.0"
30+
},
31+
"preferGlobal": true
32+
}

package.json

+3-29
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,7 @@
11
{
2-
"name": "react-tools",
3-
"description": "A set of complementary tools to React, including the JSX transformer.",
2+
"name": "react-build",
3+
"private": true,
44
"version": "0.14.0-beta1",
5-
"keywords": [
6-
"jsx",
7-
"react",
8-
"transformer",
9-
"view"
10-
],
11-
"homepage": "https://facebook.github.io/react",
12-
"bugs": "https://github.com/facebook/react/issues",
13-
"license": "BSD-3-Clause",
14-
"files": [
15-
"bin/jsx",
16-
"main.js",
17-
"src/"
18-
],
19-
"main": "main.js",
20-
"bin": {
21-
"jsx": "./bin/jsx"
22-
},
23-
"repository": {
24-
"type": "git",
25-
"url": "https://github.com/facebook/react"
26-
},
27-
"dependencies": {
28-
"commoner": "^0.10.0",
29-
"jstransform": "^11.0.0"
30-
},
315
"devDependencies": {
326
"babel": "^5.8.3",
337
"babel-eslint": "^3.1.25",
@@ -54,6 +28,7 @@
5428
"gulp-util": "^3.0.5",
5529
"gzip-js": "~0.3.2",
5630
"jest-cli": "^0.4.13",
31+
"jstransform": "^11.0.0",
5732
"object-assign": "^3.0.0",
5833
"optimist": "^0.6.1",
5934
"platform": "^1.1.0",
@@ -67,7 +42,6 @@
6742
"engines": {
6843
"node": ">=0.10.0"
6944
},
70-
"preferGlobal": true,
7145
"commonerConfig": {
7246
"version": 7
7347
},

packages/react/package.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
"lib/"
1717
],
1818
"main": "react.js",
19-
"repository": {
20-
"type": "git",
21-
"url": "https://github.com/facebook/react"
22-
},
19+
"repository": "facebook/react",
2320
"engines": {
2421
"node": ">=0.10.0"
2522
},

0 commit comments

Comments
 (0)