FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sim/scripts/local-bin.ts at main · simstudioai/sim · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
simstudioai
/
sim
Public
Notifications
You must be signed in to change notification settings
Fork
3.8k
Star
29.5k
Code
Issues
119
Pull requests
177
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sim
/
scripts
/
local-bin.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (17 loc) · 866 Bytes
Breadcrumbs
sim
/
scripts
/
local-bin.ts
Copy path
File metadata and controls
19 lines (17 loc) · 866 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import
path
from
'node:path'
const
ROOT
=
path
.
resolve
(
import
.
meta
.
dir
,
'..'
)
/**
* Absolute path to a locally-installed executable.
*
* Scripts spawn these instead of shelling out through `bunx`, which re-resolves the package on
* every call against the shared install cache — a network-backed sticky-disk mount on CI. That
* is cheap for a lone caller and serializes badly once the audits run concurrently: it took the
* desktop-bridge audit from 1s to 39s and made it the entire wall clock of the batch.
*
* `tsc` resolves here to the native TypeScript 7 compiler, which `check:native-typecheck`
* asserts — so this is the one path guarded against the bin-shadowing that otherwise silently
* selects the ~10x slower JavaScript compiler.
*/
export
function
localBin
(
name
:
string
)
:
string
{
return
path
.
join
(
ROOT
,
'node_modules'
,
'.bin'
,
name
)
}
Back
|
FazBrowse Home
|
New Git URL