Skip to content

Commit

Permalink
Move react-tools from root.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zpao committed Jul 30, 2015
1 parent cc98f83 commit d982d5e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 46 deletions.
18 changes: 5 additions & 13 deletions grunt/tasks/npm-react-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,21 @@ 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() {
if (grunt.file.exists(dest)) {
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];
Expand Down
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions npm-react-tools/package.json
Original file line number Diff line number Diff line change
@@ -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
}
32 changes: 3 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -67,7 +42,6 @@
"engines": {
"node": ">=0.10.0"
},
"preferGlobal": true,
"commonerConfig": {
"version": 7
},
Expand Down
5 changes: 1 addition & 4 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

0 comments on commit d982d5e

Please sign in to comment.