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.
This commit is contained in:
Paul O’Shannessy
2015-06-02 14:13:11 -07:00
parent cc98f83b53
commit d982d5e153
6 changed files with 41 additions and 46 deletions

View File

@@ -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 File

@@ -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 File

@@ -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 File

@@ -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"
},