Skip to content

docs: explain building a plugin together with others - #282

Open
locker95 wants to merge 1 commit into
caddyserver:masterfrom
locker95:docs/build-with-other-plugins-227
Open

docs: explain building a plugin together with others#282
locker95 wants to merge 1 commit into
caddyserver:masterfrom
locker95:docs/build-with-other-plugins-227

Conversation

@locker95

Copy link
Copy Markdown

Summary

When you're in a plugin directory and want Caddy with your plugin and other plugins, xcaddy --with other/plugin run fails with unknown flag: --with.

That's expected: without the build subcommand, args are passed through to Caddy. --with is a xcaddy build flag.

This documents the working pattern:

xcaddy build \
  --with github.com/me/my-plugin=. \
  --with github.com/mholt/caddy-events-exec
./caddy run

Docs only — same approach maintainers already described in #227.

Test plan

  • README spells out that --with is for xcaddy build, not xcaddy run
  • Example uses =. for the local plugin plus a second --with
  • Skim the new subsection under "For plugin development"

Fixes #227

When developing a plugin, bare `xcaddy` / `xcaddy run` only plugs in
the current module and passes remaining args to Caddy. `--with` is a
build flag, so `xcaddy --with other/plugin run` fails with unknown
flag. Document using `xcaddy build --with module=. --with other/...`.

Fixes caddyserver#227

Signed-off-by: Dean Chen <862469039@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building plugin with other plugins

1 participant