Skip to content

Commit 9767b86

Browse files
committed
Add experimental node.js instructions
1 parent 56da91f commit 9767b86

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

packages/cli/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,49 @@ lpm tree app.bsky.graph.defs --depth 3
5454

5555
Resolves the tree of lexicons starting at a specific NSID. Denotes circular
5656
dependencies with a yellow circle.
57+
58+
## ⚠️ Experimental Node.js Support
59+
60+
Lpm is built using Deno but it's also possible to run it with Node.js. This is experimental for now as it's a bit fiddly to setup.
61+
62+
First step is to install it with your package manager of choice:
63+
64+
```bash
65+
# pnpm 10.9+
66+
pnpm add jsr:@lpm/cli
67+
68+
# yarn 4.9+
69+
yarn add jsr:@lpm/cli
70+
71+
# npm, bun, and older versions of yarn or pnpm
72+
npx jsr add @lpm/cli # replace npx with any of yarn dlx, pnpm dlx, or bunx
73+
```
74+
75+
Note, above we don't install it globally, but rather as a project dependency. To run it, we can execute `./node_modules/@lpm/cli/bin.js`
76+
77+
```bash
78+
node ./node_modules/@lpm/cli/bin.js --help
79+
```
80+
81+
You can add a script to your `package.json` to make it easier to run:
82+
83+
```json
84+
{
85+
"scripts": {
86+
"lpm": "node ./node_modules/@lpm/cli/bin.js"
87+
}
88+
}
89+
```
90+
91+
Then you can run it with:
92+
93+
```bash
94+
# npm
95+
# Note the extra `--` that allows passing arguments to the script
96+
npm run lpm -- --version
97+
98+
# pnpm/yarn/bun (no extra `--` needed)
99+
pnpm lpm --version
100+
yarn lpm --version
101+
bun lpm --version
102+
```

0 commit comments

Comments
 (0)