Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
30c8371
WIP
trueadm Mar 7, 2017
9d78fa8
fbjs support
trueadm Mar 7, 2017
3c24a4c
WIP
trueadm Mar 7, 2017
d00cf55
dev/prod mode WIP
trueadm Mar 7, 2017
238dcf7
More WIP
trueadm Mar 7, 2017
15b13cd
builds a cjs bundle
trueadm Mar 8, 2017
690a72b
adding forwarding modules
trueadm Mar 8, 2017
ff0c871
more progress on forwarding modules and FB config
trueadm Mar 9, 2017
47fa99e
improved how certain modules get inlined for fb and cjs
trueadm Mar 9, 2017
8ef3aa5
more forwarding modules
trueadm Mar 9, 2017
fdb6e23
added comments to the module aliasing code
trueadm Mar 9, 2017
6114597
made ReactPerf and ReactTestUtils bundle again
trueadm Mar 9, 2017
a09bed0
Use -core suffix for all bundles
gaearon Mar 9, 2017
723b402
Add a lazy shim for ReactPerf
gaearon Mar 10, 2017
955b7e7
Fix forwarding module for ReactCurrentOwner
gaearon Mar 10, 2017
c9499d1
Revert "Add a lazy shim for ReactPerf"
gaearon Mar 10, 2017
c20ceeb
Rename -core suffix to -fb for clarity
gaearon Mar 10, 2017
c4dfd17
Change forwarding modules to import from -fb
gaearon Mar 10, 2017
ccfefc8
should fix fb and cjs bundles for ReactCurrentOwner
trueadm Mar 10, 2017
165bc45
added provides module for ReactCurrentOwner
trueadm Mar 10, 2017
65f11ee
should improve console output
trueadm Mar 10, 2017
7f6ecb1
fixed typo with argument passing on functon call
trueadm Mar 10, 2017
b34e7cf
Revert "should improve console output"
gaearon Mar 10, 2017
0a50b6a
Work around internal FB transform require() issue
gaearon Mar 10, 2017
71d6c3b
moved ReactInstanceMap out of React and into ReactDOM and ReactDOMFiber
trueadm Mar 10, 2017
063067d
Expose more internal modules to www
gaearon Mar 10, 2017
f6e5d72
Add missing modules to Stack ReactDOM to fix UFI
gaearon Mar 10, 2017
1f66be3
Fix onlyChild module
gaearon Mar 10, 2017
bd4d7ec
improved the build tool
trueadm Mar 10, 2017
ef50945
Add a rollup npm script
gaearon Mar 10, 2017
b82ba71
Rename ReactDOM-fb to ReactDOMStack-fb
gaearon Mar 10, 2017
95a4fbb
Fix circular dependencies now that ReactDOM-fb is a GK switch
gaearon Mar 10, 2017
3f89a77
Merge branch 'master' into rollup
gaearon Mar 10, 2017
4580b6b
Revert "Work around internal FB transform require() issue"
gaearon Mar 10, 2017
9ba6635
Bump rollup-plugin-commonjs to include a fix for rollup/rollup-plugin…
gaearon Mar 10, 2017
c2ffdcb
Add more forwarding modules that are used on www
gaearon Mar 10, 2017
1cc4278
Add even more forwarding modules that are used on www
gaearon Mar 11, 2017
f102045
Add DOMProperty to hidden exports
gaearon Mar 11, 2017
76ee978
Externalize feature flags
gaearon Mar 11, 2017
8a92f33
Remove forwarding modules with implementations
gaearon Mar 11, 2017
ae1f762
Add all injection necessary for error logging
gaearon Mar 11, 2017
3d27a04
Add missing forwarding module (oops)
gaearon Mar 11, 2017
d93b8e3
Add ReactART builds
gaearon Mar 11, 2017
32eccd5
Add ReactDOMServer bundle
gaearon Mar 11, 2017
31a9719
Fix UMD build of ReactDOMFiber
gaearon Mar 11, 2017
1eed4e1
Merge branch 'master' into rollup
gaearon Mar 11, 2017
2c9ea97
Merge branch 'master' into rollup
gaearon Mar 15, 2017
7a28190
Work in progress: start adding ReactNative bundle
gaearon Mar 15, 2017
04972cd
tidied up the options for bundles, so they can define what types they…
trueadm Mar 15, 2017
e4fcbec
Add a working RN build
gaearon Mar 16, 2017
8fa5d94
Merge branch 'master' into rollup
gaearon Mar 16, 2017
d5b91d3
further improved and tidied up build process
trueadm Mar 18, 2017
6aa9936
improved how bundles are built by exposing externals and making the p…
trueadm Mar 20, 2017
9255c64
better handling of bundling ReactCurrentOwner and accessing it from r…
trueadm Mar 20, 2017
14324bc
added NODE_DEV and NODE_PROD
trueadm Mar 21, 2017
4a578db
Fixed merge conflicts in ReactNative.js and ReactMethodsMixin.js
trueadm Mar 21, 2017
0e2f671
added NPM package creation and copying into build chain
trueadm Mar 21, 2017
e8f49c4
Improved UMD bundles, added better fixture testing and doc plus prod …
trueadm Mar 22, 2017
39a8b69
updated internal modules (WIP)
trueadm Mar 22, 2017
373e15b
fixed merge conflict
trueadm Mar 22, 2017
feda028
removed all react/lib/* dependencies from appearing in bundles create…
trueadm Mar 22, 2017
e8a2318
added react-test-renderer bundles
trueadm Mar 23, 2017
02b70bc
renamed bundles and paths
trueadm Mar 23, 2017
b4100ed
fixed fixture path changes
trueadm Mar 23, 2017
c81f2fb
added extract-errors support
trueadm Mar 23, 2017
37d334b
added extractErrors warning
trueadm Mar 23, 2017
dd0ae1a
moved shims to shims directory in rollup scripts
trueadm Mar 23, 2017
47e8057
changed pathing to use build rather than build/rollup
trueadm Mar 23, 2017
700894a
updated release doc to reflect some rollup changes
trueadm Mar 23, 2017
07a963a
Updated ReactNative findNodeHandle() to handle number case (#9238)
bvaughn Mar 23, 2017
26fa2cd
Add dynamic injection to ReactErrorUtils (#9246)
gaearon Mar 23, 2017
4d1584b
Fix ReactErrorUtils injection (#9247)
gaearon Mar 23, 2017
779d5bd
Fix merge conflict
gaearon Mar 23, 2017
d09410b
Fix Haste name
gaearon Mar 23, 2017
4458f15
Move files around
gaearon Mar 23, 2017
05bd00a
More descriptive filenames
gaearon Mar 23, 2017
c84f4e0
Add missing ReactErrorUtils shim
gaearon Mar 23, 2017
a57e140
Tweak reactComponentExpect to make it standalone-ish in www
gaearon Mar 23, 2017
bd4ff9d
Unflowify shims
gaearon Mar 24, 2017
8af3ca2
facebook-www shims now get copied over correctly to build
trueadm Mar 24, 2017
beaf32c
removed unnecessary resolve
trueadm Mar 24, 2017
b4f9895
building facebook-www/build is now all sync to prevent IO issues plus…
trueadm Mar 24, 2017
b5bdf70
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 24, 2017
0fd8aa6
removed react-native-renderer package and made build make a react-nat…
trueadm Mar 24, 2017
4691521
Merge branch 'master' into rollup
gaearon Mar 24, 2017
7dba33b
😭😭😭
gaearon Mar 24, 2017
60e78e3
Add more SSR unit tests for elements and children. (#9221)
aickin Mar 24, 2017
c5156eb
ReactElementValidator uses temporary ReactNative View propTypes gette…
bvaughn Mar 24, 2017
71a87bc
Updating packages for 16.0.0-alpha.6 release
Mar 24, 2017
56c42b5
Revert "😭😭😭"
gaearon Mar 25, 2017
9347ca0
Work around Jest issue with CurrentOwner shared state in www
gaearon Mar 25, 2017
7afb09e
updated error codes
trueadm Mar 27, 2017
d526452
fixed merge conflicts with upstream master
trueadm Mar 27, 2017
9e5271a
splits FB into FB_DEV and FB_PROD
trueadm Mar 27, 2017
5f994ee
Remove deps on specific builds from shims
gaearon Mar 27, 2017
c95ee10
should no longer mangle FB_PROD output
trueadm Mar 27, 2017
4e81eac
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 27, 2017
b025c43
Added init() dev block to ReactTestUtils
trueadm Mar 27, 2017
88293c7
added shims for DEV only code so it does not get included in prod bun…
trueadm Mar 27, 2017
65aae08
added a __DEV__ wrapping code to FB_DEV
trueadm Mar 27, 2017
ceeebd8
added __DEV__ flag behind a footer/header
trueadm Mar 27, 2017
02a0b8c
Use right haste names
gaearon Mar 27, 2017
f79b32a
keeps comments in prod
trueadm Mar 27, 2017
607b021
added external babel helpers plugin
trueadm Mar 29, 2017
28e9cb2
fixed fixtures and updated cjs/umd paths
trueadm Mar 29, 2017
77add81
Merge branch 'master' into rollup
gaearon Mar 29, 2017
1ed2b03
Fixes Jest so it run tests correctly
trueadm Mar 29, 2017
99df11d
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 29, 2017
0248811
fixed an issue with stubbed modules not properly being replaced due t…
trueadm Mar 29, 2017
0e0bb5a
added a WIP solution for ReactCurrentOwner on FB DEV
trueadm Mar 29, 2017
33fa7c3
adds a FB_TEST bundle
trueadm Mar 29, 2017
ee37df1
allows both ReactCurrentOwner and react/lib/ReactCurrentOwner
trueadm Mar 29, 2017
272a6d4
adds -test to provides module name
trueadm Mar 29, 2017
7e7ca63
Remove TEST env
gaearon Mar 29, 2017
d86e827
Ensure requires stay at the top
gaearon Mar 29, 2017
221b611
added basic mangle support (disbaled by default)
trueadm Mar 30, 2017
e1fbc7a
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 30, 2017
5893056
per bundle property mangling added
trueadm Mar 30, 2017
794e0b9
moved around plugin order to try and fix deadcode requires as per htt…
trueadm Mar 30, 2017
0017318
Merge branch 'master' into rollup
gaearon Mar 31, 2017
89199ac
Fix flow issues
gaearon Mar 31, 2017
16fc8d2
removed gulp and grunt and moved tasks to standalone node script
trueadm Mar 31, 2017
373f812
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 31, 2017
c13c82e
configured circleci to use new paths
trueadm Mar 31, 2017
eb265f3
Fix lint
gaearon Mar 31, 2017
4da9ea5
removed gulp-extract-errors
trueadm Mar 31, 2017
a449c15
added test_build.sh back in
trueadm Mar 31, 2017
dad841e
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 31, 2017
082b784
added missing newline to flow.js
trueadm Mar 31, 2017
3a671b2
fixed test coverage command
trueadm Mar 31, 2017
0f93e6a
changed permissions on test_build.sh
trueadm Mar 31, 2017
9ac0159
fixed test_html_generations.sh
trueadm Mar 31, 2017
70cc5f9
temp removed html render test
trueadm Mar 31, 2017
4dc1c51
removed the warning output from test_build, the build should do this …
trueadm Mar 31, 2017
63aeb43
fixed test_build
trueadm Mar 31, 2017
11f02c5
fixed broken npm script
trueadm Mar 31, 2017
796e89d
Merge branch 'master' into rollup
gaearon Mar 31, 2017
0820c0e
Remove unused ViewportMetrics shim
gaearon Mar 31, 2017
8e97503
Merge branch 'master' into rollup
gaearon Mar 31, 2017
ff86c3a
better error output
trueadm Mar 31, 2017
ae0cdc8
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Mar 31, 2017
e18e75c
updated circleci to node 7 for async/await
trueadm Mar 31, 2017
e628f40
Fixes
gaearon Mar 31, 2017
e7a6153
removed coverage test from circleci run
trueadm Mar 31, 2017
815f208
circleci run tets
trueadm Mar 31, 2017
fbeea6d
removed build from circlci
trueadm Apr 3, 2017
5108963
made a dedicated jest script in a new process
trueadm Apr 3, 2017
0c4f01b
moved order around of circlci tasks
trueadm Apr 3, 2017
64559f8
changing path to jest in more circleci tests
trueadm Apr 3, 2017
0364501
re-enabled code coverage
trueadm Apr 3, 2017
40cfc0c
Add file header to prod bundles
gaearon Apr 3, 2017
3bcde75
Remove react-dom/server.js (WIP: decide on the plan)
gaearon Apr 3, 2017
b00cdb8
Only UMD bundles need version header
gaearon Apr 3, 2017
69714d2
Merge with master
gaearon Apr 3, 2017
b62f7b1
Merge branch 'master' into rollup
gaearon Apr 3, 2017
2708cec
disabled const evaluation by uglify for <script></script> string literal
trueadm Apr 4, 2017
4fa30df
deal with ART modules for UMD bundles
trueadm Apr 4, 2017
c102dfe
improved how bundle output gets printed
trueadm Apr 4, 2017
cc6dba5
fixed filesize difference reporting
trueadm Apr 4, 2017
625419c
added filesize dep
trueadm Apr 4, 2017
cf10b81
Update yarn lockfile for some reason
gaearon Apr 4, 2017
3ef295c
now compares against the last run branch built on
trueadm Apr 4, 2017
5a4f84b
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Apr 4, 2017
202fd54
added react-dom-server
trueadm Apr 4, 2017
5e95acf
removed un-needed comment
trueadm Apr 4, 2017
40d9b38
results only get saved on full builds
trueadm Apr 4, 2017
c319500
moved the rollup sized plugin into a plugins directory
trueadm Apr 4, 2017
8450522
added a missing commonjs()
trueadm Apr 4, 2017
245c082
fixed missing ignore
trueadm Apr 4, 2017
59445a6
Hack around to fix RN bundle
gaearon Apr 4, 2017
23d46a8
Merge remote-tracking branch 'upstream/master' into rollup
trueadm Apr 4, 2017
4f0d34a
Partially fix RN bundles
gaearon Apr 4, 2017
3393a7f
added react-art bundle and a fixture for it
trueadm Apr 4, 2017
ef3e751
Merge branch 'rollup' of github.com:trueadm/react into rollup
trueadm Apr 4, 2017
b564dd0
Point UMD bundle to Fiber and add EventPluginHub to exported internals
gaearon Apr 4, 2017
d983d45
Make it build on Node 4
gaearon Apr 4, 2017
91d19c4
fixed eslint error with resolve being defined in outer scope
trueadm Apr 4, 2017
46d6a44
Tweak how build results are calculated and stored
gaearon Apr 4, 2017
d7e1886
Tweak fixtures build to work on Node 4
gaearon Apr 4, 2017
e16e4c0
Include LICENSE/PATENTS and fix up package.json files
gaearon Apr 4, 2017
9f46927
Add Node bundle for react-test-renderer
gaearon Apr 4, 2017
6947c4c
Revert "Hack around to fix RN bundle"
gaearon Apr 4, 2017
41e4c69
Revert more RN changes
gaearon Apr 4, 2017
d837726
Revert more unintentional changes
gaearon Apr 4, 2017
54fc862
Revert changes to error codes
gaearon Apr 4, 2017
8419e90
Add accidentally deleted RN externals
gaearon Apr 4, 2017
d0fc301
added RN_DEV/RN_PROD bundles
trueadm Apr 5, 2017
a152641
fixed typo where RN_DEV and RN_PROD were the wrong way around
trueadm Apr 5, 2017
8cf1ca7
Delete/ignore fixture build outputs
gaearon Apr 5, 2017
c731ef2
Format scripts/ with Prettier
gaearon Apr 5, 2017
e15ef20
tidied up the Rollup build process and split functions into various d…
trueadm Apr 5, 2017
48001fd
Copy folder before files
gaearon Apr 5, 2017
20d3f0e
updated yarn.lock
trueadm Apr 5, 2017
abf516e
updated results and yarn dependencies to the latest versions
trueadm Apr 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Work in progress: start adding ReactNative bundle
  • Loading branch information
gaearon committed Mar 15, 2017
commit 7a2819042f5b6e6f0d615d58d07b6f85dc09494e
28 changes: 23 additions & 5 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function getAliases(paths, bundleType) {
}

function getBanner(bundleType, hastName) {
if (bundleType === bundleTypes.FB) {
if (bundleType === bundleTypes.FB || bundleType === bundleTypes.RN) {
return (
// intentionally not indented correctly, as whitespace is literal
`/**
Expand All @@ -59,6 +59,7 @@ function updateBabelConfig(babelOpts, bundleType) {
case bundleTypes.PROD:
case bundleTypes.DEV:
case bundleTypes.NODE:
case bundleTypes.RN:
newOpts = Object.assign({}, babelOpts);

// we add the objectAssign transform for these bundles
Expand Down Expand Up @@ -106,6 +107,7 @@ function getFormat(bundleType) {
return `umd`;
case bundleTypes.NODE:
case bundleTypes.FB:
case bundleTypes.RN:
return `cjs`;
}
}
Expand All @@ -119,6 +121,7 @@ function getFilename(name, hasteName, bundleType) {
case bundleTypes.NODE:
return `${name}.cjs.js`;
case bundleTypes.FB:
case bundleTypes.RN:
return `${hasteName}.js`;
}
}
Expand Down Expand Up @@ -146,6 +149,7 @@ function getCommonJsConfig(bundleType) {
return {};
case bundleTypes.NODE: // TODO: why does it share settings with FB?
case bundleTypes.FB:
case bundleTypes.RN: // TODO: I haven't checked if this is right
// Modules we don't want to inline in the bundle.
// Force them to stay as require()s in the output.
return {
Expand Down Expand Up @@ -207,15 +211,27 @@ function getPlugins(entry, babelOpts, paths, filename, bundleType) {

const inputBundleType = argv.type;

function createBundle({babelOpts, entry, fbEntry, config, paths, name, hasteName}, bundleType) {
function createBundle({babelOpts, entry, fbEntry, rnEntry, config, paths, name, hasteName}, bundleType) {
if (inputBundleType && inputBundleType !== bundleType) {
return Promise.resolve();
}

switch (bundleType) {
case bundleTypes.FB:
entry = fbEntry;
break;
case bundleTypes.RN:
entry = rnEntry;
break;
}
if (!entry) {
return Promise.resolve();
}

const filename = getFilename(name, hasteName, bundleType);
const format = getFormat(bundleType);

return rollup({
entry: bundleType === bundleTypes.FB ? fbEntry : entry,
entry: entry,
plugins: getPlugins(entry, babelOpts, paths, filename, bundleType),
onwarn: handleRollupWarnings,
}).then(({write}) => write(
Expand All @@ -234,7 +250,9 @@ bundles.forEach(bundle => {
);
} else {
createBundle(bundle, bundleTypes.NODE).then(() =>
createBundle(bundle, bundleTypes.FB)
createBundle(bundle, bundleTypes.FB).then(() =>
createBundle(bundle, bundleTypes.RN)
)
);
}
});
Expand Down
42 changes: 20 additions & 22 deletions scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const bundleTypes = {
PROD: 'PROD',
NODE: 'NODE',
FB: 'FB',
RN: 'RN',
};

const babelOptsReact = {
Expand Down Expand Up @@ -183,28 +184,25 @@ const bundles = [
},

/******* React Native *******/
// {
// babelOpts: babelOptsReact,
// config: {
// destDir: 'build/rollup/',
// moduleName: 'ReactNative',
// sourceMap: false,
// },
// entry: 'src/umd/ReactDOMUMDEntry.js',
// name: 'react-native-renderer',
// paths: [
// 'src/umd/ReactDOMUMDEntry.js',
// 'src/umd/ReactDOMServerUMDEntry.js',

// 'src/renderers/dom/**/*.js',
// 'src/renderers/shared/**/*.js',
// 'src/test/**/*.js', // ReactTestUtils is currently very coupled to DOM.

// 'src/ReactVersion.js',
// 'src/shared/**/*.js',
// ],
// umd: false,
// },
{
babelOpts: babelOptsReact,
config: {
destDir: 'build/rollup/',
moduleName: 'ReactNative',
sourceMap: false,
},
rnEntry: 'src/renderers/native/ReactNative.js',
hasteName: 'ReactNative',
name: 'react-native-renderer',
paths: [
'src/renderers/native/**/*.js',
'src/renderers/shared/**/*.js',

'src/ReactVersion.js',
'src/shared/**/*.js',
],
umd: false,
},
];

module.exports = {
Expand Down
20 changes: 20 additions & 0 deletions scripts/rollup/forwarding-native/NativeMethodsMixin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule NativeMethodsMixin
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.NativeMethodsMixin;

20 changes: 20 additions & 0 deletions scripts/rollup/forwarding-native/ReactDebugTool.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule ReactDebugTool
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDebugTool;

20 changes: 20 additions & 0 deletions scripts/rollup/forwarding-native/ReactErrorUtils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule ReactErrorUtils
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactErrorUtils;

19 changes: 19 additions & 0 deletions scripts/rollup/forwarding-native/ReactNativePropRegistry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule ReactNativePropRegistry
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactNativePropRegistry;
20 changes: 20 additions & 0 deletions scripts/rollup/forwarding-native/TouchHistoryMath.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule TouchHistoryMath
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.TouchHistoryMath;

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule createReactNativeComponentClass
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.createReactNativeComponentClass;

20 changes: 20 additions & 0 deletions scripts/rollup/forwarding-native/findNodeHandle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2013-present, 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.
*
* @providesModule findNodeHandle
* @flow
*/

'use strict';

const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactNative');

module.exports = __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.findNodeHandle;

5 changes: 5 additions & 0 deletions scripts/rollup/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function getExternalModules(bundleType) {
};
case bundleTypes.NODE:
case bundleTypes.FB:
case bundleTypes.RN:
return {};
}
}
Expand All @@ -58,6 +59,7 @@ function getInternalModules(bundleType) {
};
case bundleTypes.NODE:
case bundleTypes.FB:
case bundleTypes.RN: // TODO: I haven't checked if this is right
return {
// we tell Rollup where these files are located internally, otherwise
// it doesn't pick them up and assumes they're external
Expand All @@ -76,6 +78,7 @@ function replaceInternalModules(bundleType) {
case bundleTypes.PROD:
case bundleTypes.NODE:
case bundleTypes.FB:
case bundleTypes.RN:
// we inline these modules in the bundles rather than leave them as external
return {
'react-dom/lib/ReactPerf': resolve('./src/renderers/shared/ReactPerf.js'),
Expand Down Expand Up @@ -112,6 +115,7 @@ function getFbjsModuleAliases(bundleType) {
};
case bundleTypes.NODE:
case bundleTypes.FB:
case bundleTypes.RN:
// for FB we don't want to bundle the above modules, instead keep them
// as external require() calls in the bundle
return {};
Expand All @@ -123,6 +127,7 @@ function replaceFbjsModuleAliases(bundleType) {
case bundleTypes.DEV:
case bundleTypes.PROD:
case bundleTypes.NODE:
case bundleTypes.RN:
return {};
case bundleTypes.FB:
// the diff for Haste to support fbjs/lib/* hasn't landed, so this
Expand Down
11 changes: 9 additions & 2 deletions src/renderers/native/ReactNative.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactNative
* @flow
*/
'use strict';

var ReactNativeStack = require('ReactNativeStack');

// TODO (bvaughn) Enable Fiber experiement via ReactNativeFeatureFlags
module.exports = require('ReactNativeStack');
var ReactNative = ReactNativeStack;

ReactNative.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
ReactNativePropRegistry: require('ReactNativePropRegistry'),
};

module.exports = ReactNative;