mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #6331 from zpao/isonpmorphic
Make Browserify-specific modules to remove DOM dependencies from npm package
This commit is contained in:
@@ -50,7 +50,7 @@ function simpleBannerify(src) {
|
||||
// Our basic config which we'll add to to make our other builds
|
||||
var basic = {
|
||||
entries: [
|
||||
'./build/modules/React.js',
|
||||
'./build/modules/ReactUMDEntry.js',
|
||||
],
|
||||
outfile: './build/react.js',
|
||||
debug: false,
|
||||
@@ -63,7 +63,7 @@ var basic = {
|
||||
|
||||
var min = {
|
||||
entries: [
|
||||
'./build/modules/React.js',
|
||||
'./build/modules/ReactUMDEntry.js',
|
||||
],
|
||||
outfile: './build/react.min.js',
|
||||
debug: false,
|
||||
@@ -81,7 +81,7 @@ var min = {
|
||||
|
||||
var addons = {
|
||||
entries: [
|
||||
'./build/modules/ReactWithAddons.js',
|
||||
'./build/modules/ReactWithAddonsUMDEntry.js',
|
||||
],
|
||||
outfile: './build/react-with-addons.js',
|
||||
debug: false,
|
||||
@@ -94,7 +94,7 @@ var addons = {
|
||||
|
||||
var addonsMin = {
|
||||
entries: [
|
||||
'./build/modules/ReactWithAddons.js',
|
||||
'./build/modules/ReactWithAddonsUMDEntry.js',
|
||||
],
|
||||
outfile: './build/react-with-addons.min.js',
|
||||
debug: false,
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
// TODO: Once we remove the DOM bits from React, this shim can go away.
|
||||
|
||||
module.exports = require('./ReactIsomorphic');
|
||||
@@ -9,13 +9,6 @@
|
||||
* @providesModule ReactWithAddons
|
||||
*/
|
||||
|
||||
/**
|
||||
* This module exists purely in the open source project, and is meant as a way
|
||||
* to create a separate standalone build of React. This build has "addons", or
|
||||
* functionality we've built and think might be useful but doesn't have a good
|
||||
* place to live inside React core.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var LinkedStateMixin = require('LinkedStateMixin');
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* 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 ReactIsomorphic
|
||||
* @providesModule React
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -6,23 +6,21 @@
|
||||
* 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 React
|
||||
* @providesModule ReactUMDEntry
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ReactDOM = require('ReactDOM');
|
||||
var ReactDOMServer = require('ReactDOMServer');
|
||||
var ReactIsomorphic = require('ReactIsomorphic');
|
||||
var React = require('React');
|
||||
|
||||
var assign = require('Object.assign');
|
||||
|
||||
// `version` will be added here by ReactIsomorphic.
|
||||
var React = {};
|
||||
var ReactUMDEntry = assign({
|
||||
__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOM,
|
||||
__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOMServer,
|
||||
}, React);
|
||||
|
||||
assign(React, ReactIsomorphic);
|
||||
|
||||
React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOM;
|
||||
React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOMServer;
|
||||
|
||||
module.exports = React;
|
||||
module.exports = ReactUMDEntry;
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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 ReactWithAddonsUMDEntry
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var ReactDOM = require('ReactDOM');
|
||||
var ReactDOMServer = require('ReactDOMServer');
|
||||
var ReactWithAddons = require('ReactWithAddons');
|
||||
|
||||
var assign = require('Object.assign');
|
||||
|
||||
// `version` will be added here by ReactIsomorphic.
|
||||
var ReactWithAddonsUMDEntry = assign({
|
||||
__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOM,
|
||||
__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOMServer,
|
||||
}, ReactWithAddons);
|
||||
|
||||
module.exports = ReactWithAddonsUMDEntry;
|
||||
Reference in New Issue
Block a user