From d468d94363a60c3e7622b11601dca1e4a8f07c54 Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Mon, 14 Sep 2020 07:32:58 -0700 Subject: [PATCH] Back out "Show FB internal instructions by default on "Getting Started" page" Summary: Unfortunately optional require does not work with docusaurus bundler configuration in case file not exist, so open source build is failing now. I'm backing out this commit until solution for dynamic imports in docusaurus found. Reviewed By: mweststrate Differential Revision: D23679198 fbshipit-source-id: 9be008f19b5945d17ec31614a8d2cb80bad9ca2e --- docs/getting-started/index.mdx | 14 +++++--- docs/getting-started/using-flipper.mdx | 13 ------- website/sidebars.js | 1 + website/src/components/FBContent.jsx | 48 -------------------------- 4 files changed, 10 insertions(+), 66 deletions(-) delete mode 100644 docs/getting-started/using-flipper.mdx delete mode 100644 website/src/components/FBContent.jsx diff --git a/docs/getting-started/index.mdx b/docs/getting-started/index.mdx index 6e24119b8..e8d9de590 100644 --- a/docs/getting-started/index.mdx +++ b/docs/getting-started/index.mdx @@ -3,7 +3,6 @@ id: index title: Desktop App --- import useBaseUrl from '@docusaurus/useBaseUrl'; -import FBContent from '../../website/src/components/FBContent'; Flipper helps you debug Android and iOS apps running in an emulator/simulator or connected physical development devices. Flipper consists of two parts: @@ -12,7 +11,12 @@ Flipper helps you debug Android and iOS apps running in an emulator/simulator or To use Flipper, you need to add the mobile SDK to your app. If you are using React Native 0.62 or higher, this is largely done automatically for you. - require('./fb/using-flipper-at-facebook.mdx')} - external={() => require('./using-flipper.mdx')} -/> +--- + +The desktop part of Flipper doesn't need any particular setup. Simply download the latest build for [Mac](https://www.facebook.com/fbflipper/public/mac), [Linux](https://www.facebook.com/fbflipper/public/linux) or [Windows](https://www.facebook.com/fbflipper/public/windows) and launch it. In order to work properly, Flipper requires a working installation of the Android and (if where applicable) iOS development tools on your system, as well as the [OpenSSL](https://www.openssl.org) binary on your `$PATH`. + +OpenSSL for Windows can be downloaded [here](https://slproweb.com/products/Win32OpenSSL.html). + +Once you start Flipper and launch an emulator/simulator or connect a device, you will already be able to see the device logs in Flipper. To see app specific data, you need to integrate our native SDKs with your app. + +Logs plugin diff --git a/docs/getting-started/using-flipper.mdx b/docs/getting-started/using-flipper.mdx deleted file mode 100644 index bbe228520..000000000 --- a/docs/getting-started/using-flipper.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -id: using-flipper -title: Desktop App ---- -import useBaseUrl from '@docusaurus/useBaseUrl'; - -The desktop part of Flipper doesn't need any particular setup. Simply download the latest build for [Mac](https://www.facebook.com/fbflipper/public/mac), [Linux](https://www.facebook.com/fbflipper/public/linux) or [Windows](https://www.facebook.com/fbflipper/public/windows) and launch it. In order to work properly, Flipper requires a working installation of the Android and (if where applicable) iOS development tools on your system, as well as the [OpenSSL](https://www.openssl.org) binary on your `$PATH`. - -OpenSSL for Windows can be downloaded [here](https://slproweb.com/products/Win32OpenSSL.html). - -Once you start Flipper and launch an emulator/simulator or connect a device, you will already be able to see the device logs in Flipper. To see app specific data, you need to integrate our native SDKs with your app. - -Logs plugin diff --git a/website/sidebars.js b/website/sidebars.js index cfa8afd21..6b51f5a6d 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -29,6 +29,7 @@ module.exports = { }, setup: { 'Getting Started': [ + ...fbInternalOnly(['getting-started/fb/using-flipper-at-facebook']), 'getting-started/index', 'getting-started/android-native', 'getting-started/ios-native', diff --git a/website/src/components/FBContent.jsx b/website/src/components/FBContent.jsx deleted file mode 100644 index dbc88f8b3..000000000 --- a/website/src/components/FBContent.jsx +++ /dev/null @@ -1,48 +0,0 @@ -/** - * 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 React from 'react'; -import {isInternal} from 'internaldocs-fb-helpers'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -function createElement(createElement) { - if (!createElement) return undefined; - if (React.isValidElement(createElement)) { - return createElement; - } - const element = createElement(); - if (React.isValidElement(element)) { - return element; - } - return React.createElement(element.default || element, {}); -} - -function FBContent({internal, external}) { - if (!isInternal()) { - return createElement(external); - } - if (internal && external) { - return ( - - {createElement(internal)} - {createElement(external)} - - ); - } else { - return createElement(internal || external); - } -} - -export default FBContent;