mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
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:
@@ -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];
|
||||
|
||||
32
npm-react-tools/package.json
Normal file
32
npm-react-tools/package.json
Normal 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
|
||||
}
|
||||
32
package.json
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
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user