Skip to content

Commit dbe6fab

Browse files
d16rfacebook-github-bot
authored andcommitted
Switch module codegen to use yarn_workspace_binary. (#34015)
Summary: Pull Request resolved: #34015 I noticed this was a very slow part of my build because each instance of the binary would run its own yarn install. Instead use the yarn_workspace approach to share a single yarn setup. Changelog: [Internal] Reviewed By: IanChilds Differential Revision: D37178005 fbshipit-source-id: cba51e168c5a2f2ee6468acb8c144db4ad352d95
1 parent d1321d8 commit dbe6fab

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

packages/react-native-codegen/DEFS.bzl

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,12 @@ def rn_codegen_cli():
4343
],
4444
visibility = ["PUBLIC"],
4545
)
46-
fb_native.sh_binary(
46+
yarn_workspace_binary(
4747
name = "generate_all_from_schema",
48-
main = "src/cli/generators/generate-all.sh",
49-
resources = native.glob(
50-
[
51-
"buck_tests/**/*.js",
52-
"src/**/*.js",
53-
],
54-
) + [
55-
"package.json",
56-
"//xplat/js:setup_env",
48+
main = "src/cli/generators/generate-all.js",
49+
root = "//xplat/js:workspace",
50+
deps = [
51+
":yarn-workspace",
5752
],
5853
visibility = ["PUBLIC"],
5954
)

packages/react-native-codegen/src/cli/generators/generate-all.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)