Skip to content

Commit 8a1939b

Browse files
committed
docs: Add comprehensive npm package documentation
Added complete guide for using LUMOS with JavaScript/TypeScript via npm. Changes: - New guide: guides/npm-package.md (comprehensive npm usage) - Installation options (global, project, npx) - CLI usage examples - Programmatic API reference - Build tool integration (Vite, Webpack, Rollup, esbuild) - CI/CD integration (GitHub Actions, GitLab, CircleCI) - Watch mode implementation - Monorepo usage (Nx, Turborepo) - TypeScript configuration - Comparison with Rust CLI - Troubleshooting section - Performance tips - Complete examples - Updated: getting-started/installation.md - Added npm installation as first option - Clear separation between JS/TS and Rust installation - Link to detailed npm guide Resolves getlumos/lumos#62 documentation requirements
1 parent 5fe742f commit 8a1939b

File tree

2 files changed

+720
-4
lines changed

2 files changed

+720
-4
lines changed

src/content/docs/getting-started/installation.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,46 @@ title: Installation
33
description: Install LUMOS CLI and start generating type-safe code for Solana
44
---
55

6-
## Prerequisites
6+
Choose your installation method based on your development environment:
7+
8+
- **JavaScript/TypeScript**[Install via npm](#install-via-npm-javascripttypescript)
9+
- **Rust/Anchor**[Install via Cargo](#install-via-cargo-rustanchor)
10+
11+
---
12+
13+
## Install via npm (JavaScript/TypeScript)
14+
15+
**No Rust required!** For JavaScript and TypeScript developers:
16+
17+
```bash
18+
# Install globally
19+
npm install -g @getlumos/cli
20+
21+
# Verify installation
22+
lumos --version
23+
# 0.1.0
24+
```
25+
26+
**Or use directly with npx:**
27+
```bash
28+
npx @getlumos/cli generate schema.lumos
29+
```
30+
31+
**Prerequisites:**
32+
- Node.js 16.0 or higher
33+
34+
**Published Package:**
35+
- 📦 [@getlumos/cli](https://www.npmjs.com/package/@getlumos/cli) - npm package with WASM
36+
37+
**Learn more:** [Using LUMOS with npm →](/guides/npm-package/)
38+
39+
---
40+
41+
## Install via Cargo (Rust/Anchor)
42+
43+
For Rust and Anchor developers:
44+
45+
### Prerequisites
746

847
- **Rust 1.70 or higher**
948
- **Cargo** package manager
@@ -17,9 +56,7 @@ rustc --version
1756

1857
If you don't have Rust installed, visit [rustup.rs](https://rustup.rs)
1958

20-
---
21-
22-
## Install from crates.io (Recommended)
59+
### Install from crates.io (Recommended)
2360

2461
The fastest way to get started with LUMOS:
2562

0 commit comments

Comments
 (0)