Skip to content

Commit a7a23ee

Browse files
docs: Add multiple template documentation in CLI (solana-foundation#3404)
1 parent afcbaed commit a7a23ee

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/src/pages/docs/cli.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ anchor build
6969

7070
Builds programs in the workspace targeting Solana's BPF runtime and emitting IDLs in the `target/idl` directory.
7171

72-
7372
```shell
7473
anchor build --skip-lint
7574
```
@@ -221,6 +220,23 @@ Initializes a project workspace with the following structure.
221220
- `tests/`: Directory for JavaScript integration tests.
222221
- `migrations/deploy.js`: Deploy script.
223222

223+
```shell
224+
anchor init --template multiple
225+
```
226+
227+
Creates a more structured program project template (rather than only a single `lib.rs` file):
228+
229+
```
230+
├── constants.rs
231+
├── error.rs
232+
├── instructions
233+
│   ├── initialize.rs
234+
│   └── mod.rs
235+
├── lib.rs
236+
└── state
237+
└── mod.rs
238+
```
239+
224240
## Keys
225241

226242
Program keypair commands.

0 commit comments

Comments
 (0)