Commit Graph

2 Commits

Author SHA1 Message Date
Pascal Hartig
4d58563168 Ignore unnecessary build artifacts
Summary:
This allows bundles to have their `.buildignore` file. I did that first to remove some things from the `static` folder, but it turned out that those aren't just unnecessary for the bundle but completely unused in general. I still think there may be a case for allowing this on a per-package basis.

Right now it excludes `.ts` files, license files and readmes. Full list of excluded files is here: P129474747

It adds up to about 6MB in the *DEFLATE compressed* bundle.

Reviewed By: nikoant

Differential Revision: D21176143

fbshipit-source-id: a13e900152617fdf1c2dbfa6330c0a06a75e5484
2020-04-24 08:35:32 -07:00
Anton Nikolaev
c1bb656a0d Re-use babel transformations
Summary:
SORRY FOR BIG DIFF, but it's really hard to split it as all these changes are cross-dependent and should be made at once:
1. Moved transformations to separate package "flipper-babel-transformer" and linked it using yarn workspaces to "static" and "pkg" packages where they are re-used. Removed double copies of transformations we had before int these two packages.
2. Converted transformations to typescript
3. Refactored transformations to avoid relying on file system paths for customisation (FB stubs and Electron stubs for headless build)
4. As babel transformations must be built before other builds - enabled incremental build for them and changed scripts to invoke the transformations build before other build scripts
5. As we need to deploy all the dependencies including the fresh "flipper-babel-transformer" as a part of "static" - implemented script which copies package with all the dependencies taking in account yarn workspaces (hoisting and symlinks)

Reviewed By: passy, mweststrate

Differential Revision: D20690662

fbshipit-source-id: 38a275b60d3c91e01ec21d1dbd72d03c05cfac0b
2020-03-27 03:26:51 -07:00