mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Fixes building release builds with the new buck integration. Reviewed By: jeanlauliac Differential Revision: D5002441 fbshipit-source-id: e7716324c7c8dd0bfcaf5b39cf716ac589e948e8
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
/**
|
|
* Copyright (c) 2016-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.
|
|
*
|
|
* @flow
|
|
*/
|
|
'use strict';
|
|
|
|
const asyncify: Asyncify = require('async/asyncify');
|
|
const optimizeModule = require('./worker/optimize-module');
|
|
const transformModule = require('./worker/transform-module');
|
|
const wrapWorkerFn = require('./worker/wrap-worker-fn');
|
|
|
|
import type {Callback} from './types.flow';
|
|
import type {OptimizationOptions} from './worker/optimize-module';
|
|
import type {TransformOptions} from './worker/transform-module';
|
|
import type {WorkerFnWithIO} from './worker/wrap-worker-fn';
|
|
|
|
type Asyncify = <A, B, C>((A, B) => C) => (A, B, Callback<C>) => void;
|
|
|
|
|
|
exports.optimizeModule =
|
|
(wrapWorkerFn(asyncify(optimizeModule)): WorkerFnWithIO<OptimizationOptions>);
|
|
exports.transformModule =
|
|
(wrapWorkerFn(transformModule): WorkerFnWithIO<TransformOptions>);
|