Expose TapEventPlugin on the www bundle (#11360)

This commit is contained in:
Dan Abramov
2017-10-25 17:37:49 +03:00
committed by GitHub
parent 96ed55ff80
commit 3ad5bd803f
7 changed files with 11 additions and 62 deletions

View File

@@ -18,10 +18,8 @@ Object.assign(ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
ReactFiberTreeReflection: require('shared/ReactFiberTreeReflection'),
ReactDOMComponentTree: require('./src/client/ReactDOMComponentTree'),
ReactInstanceMap: require('shared/ReactInstanceMap'),
// These are dependencies of TapEventPlugin:
EventPluginUtils: require('events/EventPluginUtils'),
EventPropagators: require('events/EventPropagators'),
SyntheticUIEvent: require('./src/events/SyntheticUIEvent'),
// Used by www msite:
TapEventPlugin: require('./src/events/TapEventPlugin'),
});
module.exports = ReactDOM;

View File

@@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*
* @flow
* @providesModule describeComponentFrame
*/
'use strict';

View File

@@ -17,10 +17,6 @@ const RN_DEV = Bundles.bundleTypes.RN_DEV;
const RN_PROD = Bundles.bundleTypes.RN_PROD;
const facebookWWW = 'facebook-www';
// these files need to be copied to the facebook-www build
const facebookWWWSrcDependencies = [
'packages/react-dom/src/events/TapEventPlugin.js',
];
// these files need to be copied to the react-native build
const reactNativeSrcDependencies = [
@@ -114,17 +110,7 @@ function createFacebookWWWBuild() {
const from = join('scripts', 'rollup', 'shims', facebookWWW);
const to = join('build', facebookWWW, 'shims');
return asyncCopyTo(from, to).then(() => {
let promises = [];
// we also need to copy over some specific files from src
// defined in facebookWWWSrcDependencies
for (const srcDependency of facebookWWWSrcDependencies) {
promises.push(
asyncCopyTo(resolve(srcDependency), join(to, basename(srcDependency)))
);
}
return Promise.all(promises);
});
return asyncCopyTo(from, to);
}
function copyBundleIntoNodePackage(packageName, filename, bundleType) {

View File

@@ -41,12 +41,12 @@
"gzip": 33563
},
"ReactDOM-dev.js (FB_DEV)": {
"size": 587573,
"gzip": 134618
"size": 590443,
"gzip": 135554
},
"ReactDOM-prod.js (FB_PROD)": {
"size": 418348,
"gzip": 92934
"size": 420794,
"gzip": 93574
},
"react-dom-test-utils.development.js (NODE_DEV)": {
"size": 41554,
@@ -101,8 +101,8 @@
"gzip": 5899
},
"ReactDOMServer-dev.js (FB_DEV)": {
"size": 93943,
"gzip": 25012
"size": 93901,
"gzip": 25000
},
"ReactDOMServer-prod.js (FB_PROD)": {
"size": 42426,

View File

@@ -1,17 +0,0 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule EventPropagators
*/
'use strict';
const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactDOM-fb');
module.exports =
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.EventPropagators;

View File

@@ -1,17 +0,0 @@
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule SyntheticUIEvent
*/
'use strict';
const {
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
} = require('ReactDOM-fb');
module.exports =
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SyntheticUIEvent;

View File

@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule EventPluginUtils
* @providesModule TapEventPlugin
*/
'use strict';
@@ -14,4 +14,4 @@ const {
} = require('ReactDOM-fb');
module.exports =
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.EventPluginUtils;
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.TapEventPlugin;