Use lowercase entry points for event modules (#15535)

Matches npm convention
This commit is contained in:
Andrew Clark
2019-04-29 16:25:56 -07:00
committed by GitHub
parent 43c4e5f348
commit 7882c41f60
13 changed files with 77 additions and 42 deletions

14
packages/react-events/drag.js vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
const Drag = require('./src/Drag');
module.exports = Drag.default || Drag;

14
packages/react-events/focus.js vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
const Focus = require('./src/Focus');
module.exports = Focus.default || Focus;

14
packages/react-events/hover.js vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
const Hover = require('./src/Hover');
module.exports = Hover.default || Hover;

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-events-drag.production.min.js');
} else {
module.exports = require('./cjs/react-events-drag.development.js');
}

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-events-focus.production.min.js');
} else {
module.exports = require('./cjs/react-events-focus.development.js');
}

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-events-hover.production.min.js');
} else {
module.exports = require('./cjs/react-events-hover.development.js');
}

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-events-press.production.min.js');
} else {
module.exports = require('./cjs/react-events-press.development.js');
}

View File

@@ -1,7 +0,0 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-events-swipe.production.min.js');
} else {
module.exports = require('./cjs/react-events-swipe.development.js');
}

14
packages/react-events/press.js vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
const Press = require('./src/Press');
module.exports = Press.default || Press;

View File

@@ -42,7 +42,7 @@ describe('FocusScope event responder', () => {
ReactFeatureFlags.enableEventAPI = true;
React = require('react');
ReactDOM = require('react-dom');
FocusScope = require('react-events/FocusScope');
FocusScope = require('react-events/focus-scope');
container = document.createElement('div');
document.body.appendChild(container);

14
packages/react-events/swipe.js vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
const Swipe = require('./src/Swipe');
module.exports = Swipe.default || Swipe;

View File

@@ -487,7 +487,7 @@ const bundles = [
FB_WWW_PROD,
],
moduleType: NON_FIBER_RENDERER,
entry: 'react-events/Press',
entry: 'react-events/press',
global: 'ReactEventsPress',
externals: [],
},
@@ -502,7 +502,7 @@ const bundles = [
FB_WWW_PROD,
],
moduleType: NON_FIBER_RENDERER,
entry: 'react-events/Hover',
entry: 'react-events/hover',
global: 'ReactEventsHover',
externals: [],
},
@@ -517,7 +517,7 @@ const bundles = [
FB_WWW_PROD,
],
moduleType: NON_FIBER_RENDERER,
entry: 'react-events/Focus',
entry: 'react-events/focus',
global: 'ReactEventsFocus',
externals: [],
},
@@ -532,7 +532,7 @@ const bundles = [
FB_WWW_PROD,
],
moduleType: NON_FIBER_RENDERER,
entry: 'react-events/FocusScope',
entry: 'react-events/focus-scope',
global: 'ReactEventsFocusScope',
externals: [],
},
@@ -547,7 +547,7 @@ const bundles = [
FB_WWW_PROD,
],
moduleType: NON_FIBER_RENDERER,
entry: 'react-events/Swipe',
entry: 'react-events/swipe',
global: 'ReactEventsSwipe',
externals: [],
},
@@ -562,7 +562,7 @@ const bundles = [
FB_WWW_PROD,
],
moduleType: NON_FIBER_RENDERER,
entry: 'react-events/Drag',
entry: 'react-events/drag',
global: 'ReactEventsDrag',
externals: [],
},