Add support to build flipper-server from SandCastle
Summary: This refactors the flipper-server release script in such a way that it works the same as the normal release script, which solves two problems: 1) the official release script modifies versioned files, as it touches the package.json 2) it was slightly confusing that `flipper-server/static` was filled for release builds only, but not used in dev builds 3) running test:npx without running a release build before it, would fail with hard to comprehend errors. this has been solved now by removing that script and make it an arg of `build:flipper-server` Also some further minor changes to prepare running a corresponding build / release job from SandCastle (later in this stack) Reviewed By: nikoant Differential Revision: D33297214 fbshipit-source-id: f6299aa982c3e59d1cc6479a93c56cbe4b57f85c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
efdf9d2d64
commit
cbda298b9d
@@ -29,12 +29,3 @@ yarn build:flipper-server
|
||||
Pass the `--open` flag to open Flipper server after building
|
||||
|
||||
Use `--no-rebuild-plugins` to speed up subsequent builds if default plugins have been build already
|
||||
|
||||
### Test NPX build
|
||||
|
||||
```
|
||||
cd <Flipper checkout>/desktop/
|
||||
yarn build:flipper-server
|
||||
cd flipper-server
|
||||
yarn test:npx
|
||||
```
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"repository": "facebook/flipper",
|
||||
"main": "server.js",
|
||||
"bin": "server.js",
|
||||
"flipperBundlerEntry": "src",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/facebook/flipper/issues",
|
||||
"dependenciesComment": "mac-ca is required dynamically for darwin, node-fetch is treated special in electron-requires, not sure why",
|
||||
@@ -32,12 +31,13 @@
|
||||
"peerDependencies": {},
|
||||
"scripts": {
|
||||
"reset": "rimraf lib *.tsbuildinfo",
|
||||
"build": "tsc -b",
|
||||
"test:npx": "yarn pack && cd ~/Desktop && rm -rf ~/.npm/_npx/ && mv ~/fbsource/xplat/sonar/desktop/flipper-server/flipper-server-v0.0.0.tgz . && npx flipper-server-v0.0.0.tgz"
|
||||
"build": "tsc -b"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"static/**/*"
|
||||
"static/**/*",
|
||||
"README.md",
|
||||
"server.js"
|
||||
],
|
||||
"homepage": "https://github.com/facebook/flipper",
|
||||
"keywords": [
|
||||
|
||||
@@ -69,7 +69,7 @@ export async function startFlipperServer(
|
||||
console.error('Failed to load keytar:', e);
|
||||
}
|
||||
|
||||
const environmentInfo = await getEnvironmentInfo(staticPath, isProduction);
|
||||
const environmentInfo = await getEnvironmentInfo(appPath, isProduction);
|
||||
|
||||
const flipperServer = new FlipperServerImpl(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user