Skip to content

Commit

Permalink
build: use workspace aware node_modules (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodymindarts committed Oct 6, 2023
1 parent 1e9dee9 commit 5f330d9
Show file tree
Hide file tree
Showing 13 changed files with 888 additions and 528 deletions.
9 changes: 9 additions & 0 deletions BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
load("@toolchains//workspace-pnpm:macros.bzl", "pnpm_workspace")

pnpm_workspace(
name = "workspace",
child_packages = [
"//core/api:package.json"
],
visibility = ["PUBLIC"],
)
14 changes: 6 additions & 8 deletions core/api/BUCK
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
load("@toolchains//simple-pnpm:macros.bzl", "build_node_modules", "npm_bin")
load("@toolchains//workspace-pnpm:macros.bzl", "tsc_build")
load("@toolchains//workspace-pnpm:macros.bzl", "build_node_modules", "tsc_build")

build_node_modules(
name = "node_modules",
export_file(
name = "package.json",
visibility = ["PUBLIC"],
)

npm_bin(
name = "tsc_bin",
bin_name = "tsc",
visibility = ["PUBLIC"],
build_node_modules(
name = "node_modules",
)

filegroup(
Expand Down
2 changes: 1 addition & 1 deletion core/api/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "galoy",
"name": "api",
"scripts": {
"tsc-check-noimplicitany": "tsc --noEmit -p tsconfig.no-implicit-any.json",
"tsc-check": "tsc --noEmit -p tsconfig.d.json && tsc --noEmit",
Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "si",
"version": "1.0.0",
"description": "galoy monorepo",
"scripts": {
"preinstall": "npx only-allow pnpm",
"nodev": "node -v",
"whichnode": "which node"
},
"engines": {
"node": "20",
"pnpm": "8"
},
"packageManager": "[email protected]"
}

Loading

0 comments on commit 5f330d9

Please sign in to comment.