Skip to content
Browse files

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 d982d5e153186b45a523e740d3ae7be699adda48 @zpao zpao committed
View
18 grunt/tasks/npm-react-tools.js
@@ -4,6 +4,7 @@ var fs = require('fs');
var grunt = require('grunt');
var src = 'npm-react-tools';
+var srcSrc = 'src/**/*.js';
var dest = 'build/npm-react-tools/';
function buildRelease() {
@@ -11,22 +12,13 @@ function buildRelease() {
grunt.file.delete(dest);
}
- // read our required files from package.json
- var pkgFiles = grunt.config.data.pkg.files;
-
// copy all files from src first, includes custom README
var mappings = grunt.file.expandMapping('**/*', dest, {cwd: src});
- // make sure we also get package.json
- pkgFiles.push('package.json');
-
- pkgFiles.map(function(file) {
- if (grunt.file.isDir(file)) {
- mappings = mappings.concat(grunt.file.expandMapping(file + '**/*', dest));
- } else {
- mappings.push({src: [file], dest: dest + file});
- }
- });
+ // Also copy all files from src/ (for react-native)
+ mappings = mappings.concat(
+ grunt.file.expandMapping(srcSrc, dest)
+ );
mappings.forEach(function(mapping) {
var mappingSrc = mapping.src[0];
View
0 bin/jsx → npm-react-tools/bin/jsx
File renamed without changes.
View
0 main.js → npm-react-tools/main.js
File renamed without changes.
View
32 npm-react-tools/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "react-tools",
+ "description": "A set of complementary tools to React, including the JSX transformer.",
+ "version": "0.14.0-alpha3",
+ "keywords": [
+ "react",
+ "jsx",
+ "transformer",
+ "view"
+ ],
+ "homepage": "https://facebook.github.io/react",
+ "bugs": "https://github.com/facebook/react/issues",
+ "license": "BSD-3-Clause",
+ "files": [
+ "main.js",
+ "bin/jsx",
+ "src/"
+ ],
+ "main": "main.js",
+ "bin": {
+ "jsx": "./bin/jsx"
+ },
+ "repository": "facebook/react",
+ "dependencies": {
+ "commoner": "^0.10.0",
+ "jstransform": "^11.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "preferGlobal": true
+}
View
32 package.json
@@ -1,33 +1,7 @@
{
- "name": "react-tools",
- "description": "A set of complementary tools to React, including the JSX transformer.",
+ "name": "react-build",
+ "private": true,
"version": "0.14.0-beta1",
- "keywords": [
- "jsx",
- "react",
- "transformer",
- "view"
- ],
- "homepage": "https://facebook.github.io/react",
- "bugs": "https://github.com/facebook/react/issues",
- "license": "BSD-3-Clause",
- "files": [
- "bin/jsx",
- "main.js",
- "src/"
- ],
- "main": "main.js",
- "bin": {
- "jsx": "./bin/jsx"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/facebook/react"
- },
- "dependencies": {
- "commoner": "^0.10.0",
- "jstransform": "^11.0.0"
- },
"devDependencies": {
"babel": "^5.8.3",
"babel-eslint": "^3.1.25",
@@ -54,6 +28,7 @@
"gulp-util": "^3.0.5",
"gzip-js": "~0.3.2",
"jest-cli": "^0.4.13",
+ "jstransform": "^11.0.0",
"object-assign": "^3.0.0",
"optimist": "^0.6.1",
"platform": "^1.1.0",
@@ -67,7 +42,6 @@
"engines": {
"node": ">=0.10.0"
},
- "preferGlobal": true,
"commonerConfig": {
"version": 7
},
View
5 packages/react/package.json
@@ -16,10 +16,7 @@
"lib/"
],
"main": "react.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/facebook/react"
- },
+ "repository": "facebook/react",
"engines": {
"node": ">=0.10.0"
},

0 comments on commit d982d5e

Please sign in to comment.
Something went wrong with that request. Please try again.