Add sparse profile

Summary:
If you just use this profile `hg sparse switch tools/scm/sparse/xplat/flipper-js`, your total checkout will only be around 9 gigs.

I officially ran out of patience and out of space with the recent addition of `/arvr` which alone is about 40GB and I mostly touch Flipper files.

I also included staticdocs and the Rust third-party libraries so Launcher, plugin-metrics etc. are supported, too.

Reviewed By: mweststrate

Differential Revision: D31243980

fbshipit-source-id: 650d67d89298901610fa20330b7737f0a304569e
This commit is contained in:
Pascal Hartig
2021-09-29 06:04:09 -07:00
committed by Facebook GitHub Bot
parent 42374cb10d
commit 1d5a2d876f

View File

@@ -23,7 +23,7 @@ When developing Flipper plugins we recommend the following IDEs:
### TypeScript
Flipper Desktop is written in TypeScript.
Flipper Desktop is written in TypeScript.
Using our internal "VSCode @ FB" as IDE is strongly recommended (`code-fb`).
Make sure to install the `[FB-Internal]` "ESLint" and "Pretter" extensions are enabled.
@@ -50,7 +50,7 @@ When developing Flipper plugins we strongly recommend to run from Flipper itself
- Automatic refresh after code changes.
- React and Redux Dev Tools.
- [Debugging](debugging) using Chrome Dev Tools or Visual Studio Code.
- Additional debug information like React warnings and performance metrics.
- Additional debug information like React warnings and performance metrics.
Prerequisites for Flipper development build:
- node ≥ 14
@@ -75,19 +75,29 @@ Tip: start with `yarn start --fast-refresh` for experimental fast refresh.
<FbInternalOnly>
```
fbclone fbsource
```bash
fbclone fbsource --sparse tools/scm/sparse/xplat/flipper-js
cd ~/fbsource/xplat/sonar/desktop
yarn
yarn start
```
A note on sparse profiles: We have a minimal profile for working with the Flipper JavaScript
files in `fbsource` for plugin developers. This will drastically reduce the size of your checkout, but
won't include the files necessary to, for instance, build and work on mobile apps.
If you have an existing sparse checkout, you can add the Flipper profile with
```bash
hg sparse enable tools/scm/sparse/xplat/flipper-js
```
Tip: start with `yarn start --fast-refresh` for experimental fast refresh.
Tip: start wih `yarn start --public-build` to preview changes for public builds.
Use VSCode to hack on Flipper.
To make sure ESLint and Prettier are applied correctly, make sure to open either `sonar` or `sonar/desktop` as workspace folder in VSCode: `code-fb ~/fbsource/xplat/sonar`.
To make sure ESLint and Prettier are applied correctly, make sure to open either `sonar` or `sonar/desktop` as workspace folder in VSCode: `code-fb ~/fbsource/xplat/sonar`.
</FbInternalOnly>
@@ -121,9 +131,9 @@ Options:
which means that all plugins loaded. [array]
--open-dev-tools Open Dev Tools window on startup. The flag is disabled
by default. Env var FLIPPER_OPEN_DEV_TOOLS is equivalent
to the command-line option "--open-dev-tools". If
"FLIPPER_UPDATE_DEV_TOOLS=true" is set additionally,
Flipper will try to update the dev tools from the play
to the command-line option "--open-dev-tools". If
"FLIPPER_UPDATE_DEV_TOOLS=true" is set additionally,
Flipper will try to update the dev tools from the play
store. [boolean]
--dev-server-port Dev server port. 3000 by default. Env var "PORT=3001" is
equivalent to the command-line option "--dev-server-port
@@ -155,7 +165,7 @@ To start Flipper against a specific OnDemand instance, set FB_ONDEMAND flag, e.g
## Submitting a diff / PR
Make sure your new functionality is covered with tests, and run `yarn test` or `yarn test --watch` in the `desktop/` directory to verify that they pass.
Make sure your new functionality is covered with tests, and run `yarn test` or `yarn test --watch` in the `desktop/` directory to verify that they pass.
See the [testing](testing) page for more details on writing and running test.