Skip to content

Instantly share code, notes, and snippets.

@zpao
zpao / index.js
Created February 16, 2016 23:00
/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/*eslint-disable no-eval */
/*eslint-disable block-scoped-var */
# Copy & Paste the commands below to build your very own bundle that exposes React, ReactDOM, ReactDOMServer
# Assumes *nix and node & npm are installed
npm install browserify react react-dom
echo "global.React = require('react');\nglobal.ReactDOM = require('react-dom');\nglobal.ReactDOMServer = require('react-dom/server');" > source.js
NODE_ENV=development ./node_modules/.bin/browserify source.js > bundle.js
@zpao
zpao / foo.diff
Created September 26, 2015 00:09
--- dist orig/relay.js 2015-09-25 17:05:10.000000000 -0700
+++ dist/relay.js 2015-09-25 17:07:07.000000000 -0700
@@ -136,9 +136,9 @@
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
- var invariant = function invariant(condition, format, a, b, c, d, e, f) {
+ var invariant = function (condition, format, a, b, c, d, e, f) {
if (true) {
@zpao
zpao / foo.diff
Created September 10, 2015 00:32
--- _site/feed_old.xml 2015-09-09 17:31:09.000000000 -0700
+++ _site/feed.xml 2015-09-09 17:31:04.000000000 -0700
@@ -1,19 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
- <channel>
- <title>React</title>
- <description>A JavaScript library for building user interfaces</description>
- <link>https://facebook.github.io/react</link>
- <atom:link href="https://facebook.github.io/react/feed.xml" rel="self" type="application/rss+xml" />
diff --git a/AUTHORS b/AUTHORS
index 5f34c87..1727f18 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,7 +13,6 @@ Alex <ultrafez@users.noreply.github.com>
Alex Boyd <alex@opengroove.org>
Alex Lopatin <alex@alexlopatin.com>
Alex Mykyta <dancingwithcows@gmail.com>
-Alex Pien <alexpien@gmail.com>
Alex Smith <iqwz@ya.ru>
0 info it worked if it ends with ok
1 verbose cli [ 'node',
1 verbose cli '/Users/poshannessy/.nvm/v0.10.40/bin/npm',
1 verbose cli 'deprecate',
1 verbose cli 'react-tools',
1 verbose cli '' ]
2 info using npm@3.2.2
3 info using node@v0.10.40
4 silly mapToRegistry name react-tools
5 silly mapToRegistry using default registry
diff --git a/src/isomorphic/modern/class/React.d.ts b/src/isomorphic/modern/class/React.d.ts
index ff31760..25ec14a 100644
--- a/src/isomorphic/modern/class/React.d.ts
+++ b/src/isomorphic/modern/class/React.d.ts
@@ -26,6 +26,7 @@ declare module 'React' {
}
export var PropTypes : any;
export function createElement(tag : any, props ?: any, ...children : any[]) : any
+ export function createFactory(component : any) : any
export function render(element : any, container : any) : any
diff -U4 lib_/Deferred.js lib/Deferred.js
--- lib_/Deferred.js 2015-07-23 15:50:29.000000000 -0700
+++ lib/Deferred.js 2015-07-23 18:08:47.000000000 -0700
@@ -7,9 +7,9 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule Deferred
* @typechecks
- *
+ * @flow
diff -U4 lib_/Deferred.js lib/Deferred.js
--- lib_/Deferred.js 2015-07-23 15:50:29.000000000 -0700
+++ lib/Deferred.js 2015-07-23 15:54:02.000000000 -0700
@@ -7,9 +7,9 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule Deferred
* @typechecks
- *
+ * @flow
diff --git a/build_helpers/buildNPMInternals.sh b/build_helpers/buildNPMInternals.sh
index 8ad0e19..f103381 100755
--- a/build_helpers/buildNPMInternals.sh
+++ b/build_helpers/buildNPMInternals.sh
@@ -6,6 +6,24 @@ var glob = require('glob');
var path = require('path');
var fs = require('fs');
var babel = require('babel-core');
+var assign = require('object-assign');
+