Initialise flipper-ui-browser with socket connection
Summary: This diff sets up the socket connection between flipper-browser and flipper-server, and verifies that the initial UI initialisation work (e.g. `get-config` command works). The initial RenderHost is initialised as well based on the config and browser APIs. Note that flipper-ui-core itself isn't started yet, as that has still a plethora of node imports, so Metro will correctly refuse to bundle Not in this diff * remove Node usage from flipper-ui-core * implement all RenderHost APIs Reviewed By: aigoncharov Differential Revision: D32644074 fbshipit-source-id: 2c8065caf0191771a3867b69a431ca50eeb7a5a3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
29a907c733
commit
5d45bd741b
35
desktop/babel-transformer/src/transform-browser.ts
Normal file
35
desktop/babel-transformer/src/transform-browser.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {default as doTransform} from './transform';
|
||||
import {default as getCacheKey} from './get-cache-key';
|
||||
|
||||
const presets = [require('@babel/preset-react')];
|
||||
const plugins = [
|
||||
require('./import-react'),
|
||||
require('./app-flipper-requires'),
|
||||
require('./fb-stubs'),
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
transform,
|
||||
getCacheKey,
|
||||
};
|
||||
|
||||
function transform({
|
||||
filename,
|
||||
options,
|
||||
src,
|
||||
}: {
|
||||
filename: string;
|
||||
options: any;
|
||||
src: string;
|
||||
}) {
|
||||
return doTransform({filename, options, src, presets, plugins});
|
||||
}
|
||||
Reference in New Issue
Block a user