From 08633083b7d3a97b260c1cfc66f378f33b44c759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Coss=C3=ADo?= <62079184+coszio@users.noreply.github.com> Date: Thu, 11 Aug 2022 13:29:22 -0500 Subject: [PATCH] Add workspace section to `Anchor.toml` reference (#2105) --- docs/src/pages/docs/manifest.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/src/pages/docs/manifest.md b/docs/src/pages/docs/manifest.md index fbbc534839..04a34056f6 100644 --- a/docs/src/pages/docs/manifest.md +++ b/docs/src/pages/docs/manifest.md @@ -37,6 +37,38 @@ Example: url = "https://anchor.projectserum.com" ``` +## workspace + +#### types + +Adds a directory where you want the `.ts` file to be copied when running `anchor build` or `anchor idl parse`. This is helpful when you want to keep this file in version control, like when using it on the frontend, which will probably not have access to the `target` directory generated by anchor. + +Example: + +```toml +[workspace] +types = "app/src/idl/" +``` + +#### members + +Sets the paths --relative to the `Anchor.toml`-- + to all programs in the local + workspace, i.e., the path to the `Cargo.toml` manifest associated with each + program that can be compiled by the `anchor` CLI. For programs using the + standard Anchor workflow, this can be ommitted. For programs not written in Anchor + but still want to publish, this should be added. + +Example: + +```toml +[workspace] +members = [ + "programs/*", + "other_place/my_program" +] +``` + ## programs Example: