forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add UMD production+profiling entry points (facebook#13642)
* Added UMD_PROFILING type to react-dom and scheduling package. Added UMD shim to schedule package. * Added new schedule umd prod+prof bundle to API test
- Loading branch information
Showing
9 changed files
with
177 additions
and
6 deletions.
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
packages/schedule/npm/umd/schedule-tracing.profiling.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/** | ||
* @license React | ||
* | ||
* 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
(function(global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' | ||
? (module.exports = factory(require('react'))) | ||
: typeof define === 'function' && define.amd // eslint-disable-line no-undef | ||
? define(['react'], factory) // eslint-disable-line no-undef | ||
: (global.ScheduleTracing = factory(global)); | ||
})(this, function(global) { | ||
function unstable_clear() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_clear.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_getCurrent() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_getCurrent.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_getThreadID() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_getThreadID.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_subscribe() { | ||
// eslint-disable-next-line max-len | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_subscribe.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_trace() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_trace.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_unsubscribe() { | ||
// eslint-disable-next-line max-len | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_unsubscribe.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_wrap() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ScheduleTracing.unstable_wrap.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
return Object.freeze({ | ||
unstable_clear: unstable_clear, | ||
unstable_getCurrent: unstable_getCurrent, | ||
unstable_getThreadID: unstable_getThreadID, | ||
unstable_subscribe: unstable_subscribe, | ||
unstable_trace: unstable_trace, | ||
unstable_unsubscribe: unstable_unsubscribe, | ||
unstable_wrap: unstable_wrap, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* @license React | ||
* | ||
* 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. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
(function(global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' | ||
? (module.exports = factory(require('react'))) | ||
: typeof define === 'function' && define.amd // eslint-disable-line no-undef | ||
? define(['react'], factory) // eslint-disable-line no-undef | ||
: (global.Schedule = factory(global)); | ||
})(this, function(global) { | ||
function unstable_now() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Schedule.unstable_now.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_scheduleWork() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Schedule.unstable_scheduleWork.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
function unstable_cancelScheduledWork() { | ||
return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Schedule.unstable_cancelScheduledWork.apply( | ||
this, | ||
arguments | ||
); | ||
} | ||
|
||
return Object.freeze({ | ||
unstable_now: unstable_now, | ||
unstable_scheduleWork: unstable_scheduleWork, | ||
unstable_cancelScheduledWork: unstable_cancelScheduledWork, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters