Commit Graph

8 Commits

Author SHA1 Message Date
John Knox
5d99817555 Add --no-plugins arg to speed up headless development
Summary:
Compiling headless flipper takes a long time. This is because it individually compiles and bundles every plugin.

When debugging core headless, you don't need to compile any plugins, so this adds a build flag `--no-plugins` to skip that and vastly speed up iteration speed.

Reduces build time from 3 minutes to 20s

Reviewed By: priteshrnandgaonkar

Differential Revision: D16131322

fbshipit-source-id: 2b38ee37183a1257b3993f392cf623b2631fd7da
2019-07-05 08:09:18 -07:00
Pascal Hartig
939cc531e2 Fix revision bundling
Summary:
This fixes headless not terminating due to the `package.json` not being readable.
I instead write this to the `global` object in the same way that the version is
set.

Reviewed By: jknoxville

Differential Revision: D14579316

fbshipit-source-id: 238afe912366c423552305e120088f4abac4c20b
2019-03-22 10:41:01 -07:00
Daniel Büchele
825bfffd21 create one headless file for all platforms
Summary: We are distributing a single package via fbpkg containing the headless version linux and macOS. This changes the build process to only create a single zip-file containing these binaries.

Reviewed By: passy

Differential Revision: D14042031

fbshipit-source-id: 88992f17501353a70bc21799c6bd2957576268a3
2019-02-12 06:18:56 -08:00
Daniel Büchele
e78bd57514 build headless
Summary:
- create a zip-file when building the headless version of Flipper
- restore pkg cache in Sandcastle from pantri
- run build script in sandcastle.

Changes need to go together with D13942919

Reviewed By: passy

Differential Revision: D13942701

fbshipit-source-id: caac7d6cda99fec2a6836c652957ff609a0bf8bb
2019-02-05 11:35:52 -08:00
Daniel Büchele
22f9401e05 move version number to build-utils
Summary:
* The generation of the version number is moved to build-utils so it can be used from the headless build process as well.
* The prelude script for the headless version exposes the version number on `global.__VERSION__`
* While at this file, moving some functions in the build process to use the Sync version. Doesn't matter for the build process anyways and the syntax is much nicer.

Reviewed By: passy

Differential Revision: D13843678

fbshipit-source-id: 7df8364044ab6ebc83a4060aab2e3a42ae48a934
2019-02-04 07:29:13 -08:00
Daniel Büchele
5b68c59b5c package bundle
Summary:
For the electron build, plugins are bundled with the app and loaded from there at launch. The headless version can't require from its binary, so plugins need to be required from another path.

This diff makes the path where bundled plugins are loaded from adjustable via an environment variable: `BUNDLED_PLUGIN_PATH`. If it's set, the plugins are loaded from this path, otherwise we default to the old behaviour of including them from `./defaultPlugins`.

For the headless version we expect the plugins to be in a folder called `plugins` next to the executable. This should later be configurable via an argument passed to the CLI.

Reviewed By: passy

Differential Revision: D13843676

fbshipit-source-id: 04237ae6631b4f2ba56887fe992a56f860724edc
2019-02-04 07:29:13 -08:00
Daniel Büchele
d512c97cab package bundle
Summary:
Building binaries for the headless version of Flipper. These binaries include node, so they can be run independent on any system.

allow-large-files

Reviewed By: passy

Differential Revision: D13843677

fbshipit-source-id: c053177328ddfcba11f9a293951ebe4db4d84034
2019-02-04 07:29:13 -08:00
Daniel Büchele
7ac6a09af1 build headless version
Summary:
* Adds `build-headless.js` to bundle the app using metro
* the build script replaces the prelude code added by metro with our own to make it work in node. Metro will add an API to add custom prelude code in the next version.
* Pins down metro's dependency of `temp` to `v0.9.0` (instead of `0.8.3`) to be compatible with node 10. (This will be fixed in a metro upgrade)

Reviewed By: passy

Differential Revision: D13786574

fbshipit-source-id: bddb3542c370c068d90a90c4b59337f995e4fa3f
2019-01-25 12:19:07 -08:00