From 1a4f802033f906121406e1d15f5c64ff041086a1 Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Mon, 20 Apr 2026 17:44:02 +0200 Subject: [PATCH] Update ex_doc, add llms.txt support, update description --- README.md | 2 +- mix.exs | 32 +++++++++++++++++++++++++++----- mix.lock | 4 ++-- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6f710bd..37bdcb5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The package can be installed by adding `membrane_file_plugin` to your list of de ```elixir def deps do [ - {:membrane_file_plugin, "~> 0.17.3"} + {:membrane_file_plugin, "~> 0.17.4"} ] end ``` diff --git a/mix.exs b/mix.exs index 88db996..4f7114c 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Membrane.File.Plugin.Mixfile do use Mix.Project - @version "0.17.3" + @version "0.17.4" @github_url "https://github.com/membraneframework/membrane_file_plugin" @@ -16,14 +16,15 @@ defmodule Membrane.File.Plugin.Mixfile do dialyzer: dialyzer(), # hex - description: "Plugin for reading and writing to files for Membrane Multimedia Framework", + description: "Source and Sink elements for local filesystem I/O.", package: package(), # docs name: "Membrane File plugin", source_url: @github_url, homepage_url: "https://membraneframework.org", - docs: docs() + docs: docs(), + aliases: [docs: ["docs", &prepend_llms_links/1]] ] end @@ -37,7 +38,7 @@ defmodule Membrane.File.Plugin.Mixfile do # Testing {:mox, "~> 1.0", only: :test}, # Development - {:ex_doc, "~> 0.28", only: :dev, runtime: false}, + {:ex_doc, "~> 0.40", only: :dev, runtime: false}, {:credo, "~> 1.6", only: :dev, runtime: false}, {:dialyxir, "~> 1.1", only: :dev, runtime: false} ] @@ -72,9 +73,30 @@ defmodule Membrane.File.Plugin.Mixfile do [ main: "readme", extras: ["README.md", "LICENSE"], - formatters: ["html"], source_ref: "v#{@version}", nest_modules_by_prefix: [Membrane.File] ] end + + defp prepend_llms_links(_) do + output_dir = docs()[:output] || "doc" + path = Path.join(output_dir, "llms.txt") + + if File.exists?(path) do + existing = File.read!(path) + + footer = """ + + + ## See Also + + - [Membrane Framework AI Skill](https://hexdocs.pm/membrane_core/skill.md) + - [Membrane Core](https://hexdocs.pm/membrane_core/llms.txt) + """ + + File.write!(path, String.trim_trailing(existing) <> footer) + else + IO.warn("#{path} not found — llms.txt was not generated, check your ex_doc configuration") + end + end end diff --git a/mix.lock b/mix.lock index 6c71701..dc2699a 100644 --- a/mix.lock +++ b/mix.lock @@ -2,7 +2,7 @@ "bunch": {:hex, :bunch, "1.6.1", "5393d827a64d5f846092703441ea50e65bc09f37fd8e320878f13e63d410aec7", [:mix], [], "hexpm", "286cc3add551628b30605efbe2fca4e38cc1bea89bcd0a1a7226920b3364fe4a"}, "bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"}, "coerce": {:hex, :coerce, "1.0.2", "5ef791040c92baaa5dd344887563faaeac6e6742573a167493294f8af3672bbe", [:mix], [], "hexpm", "0b3451c729571234fdac478636c298e71d1f2ce1243abed5fa43fa3181b980eb"}, - "credo": {:hex, :credo, "1.7.17", "f92b6aa5b26301eaa5a35e4d48ebf5aa1e7094ac00ae38f87086c562caf8a22f", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1eb5645c835f0b6c9b5410f94b5a185057bcf6d62a9c2b476da971cde8749645"}, + "credo": {:hex, :credo, "1.7.18", "5c5596bf7aedf9c8c227f13272ac499fe8eae6237bd326f2f07dfc173786f042", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "a189d164685fd945809e862fe76a7420c4398fa288d76257662aecb909d6b3e5"}, "dialyxir": {:hex, :dialyxir, "1.4.7", "dda948fcee52962e4b6c5b4b16b2d8fa7d50d8645bbae8b8685c3f9ecb7f5f4d", [:mix], [{:erlex, ">= 0.2.8", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b34527202e6eb8cee198efec110996c25c5898f43a4094df157f8d28f27d9efe"}, "earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"}, "erlex": {:hex, :erlex, "0.2.8", "cd8116f20f3c0afe376d1e8d1f0ae2452337729f68be016ea544a72f767d9c12", [:mix], [], "hexpm", "9d66ff9fedf69e49dc3fd12831e12a8a37b76f8651dd21cd45fcf5561a8a7590"}, @@ -13,7 +13,7 @@ "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, "makeup_erlang": {:hex, :makeup_erlang, "1.0.3", "4252d5d4098da7415c390e847c814bad3764c94a814a0b4245176215615e1035", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "953297c02582a33411ac6208f2c6e55f0e870df7f80da724ed613f10e6706afd"}, - "membrane_core": {:hex, :membrane_core, "1.2.6", "22329f6a5ac1f56a58666e3bf48e07dcd0978143c23626226127f3baa3c89a95", [:mix], [{:bunch, "~> 1.6", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 3.0 or ~> 4.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7bdee620f5c1fc492613b12566b1b95e7e09f5eb9364c0fed742fffb16266ab4"}, + "membrane_core": {:hex, :membrane_core, "1.2.7", "af1f277c55a2ce8e2c89de7939b912890e592a378c0715ab4f8a5c74e741db16", [:mix], [{:bunch, "~> 1.6", [hex: :bunch, repo: "hexpm", optional: false]}, {:qex, "~> 0.3", [hex: :qex, repo: "hexpm", optional: false]}, {:ratio, "~> 3.0 or ~> 4.0", [hex: :ratio, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "ae1bd2805ae5817e0b132121f6382cc5cbb891ac6b62a759ffaa2ff62b49c488"}, "mox": {:hex, :mox, "1.2.0", "a2cd96b4b80a3883e3100a221e8adc1b98e4c3a332a8fc434c39526babafd5b3", [:mix], [{:nimble_ownership, "~> 1.0", [hex: :nimble_ownership, repo: "hexpm", optional: false]}], "hexpm", "c7b92b3cc69ee24a7eeeaf944cd7be22013c52fcb580c1f33f50845ec821089a"}, "nimble_ownership": {:hex, :nimble_ownership, "1.0.2", "fa8a6f2d8c592ad4d79b2ca617473c6aefd5869abfa02563a77682038bf916cf", [:mix], [], "hexpm", "098af64e1f6f8609c6672127cfe9e9590a5d3fcdd82bc17a377b8692fd81a879"}, "nimble_parsec": {:hex, :nimble_parsec, "1.4.2", "8efba0122db06df95bfaa78f791344a89352ba04baedd3849593bfce4d0dc1c6", [:mix], [], "hexpm", "4b21398942dda052b403bbe1da991ccd03a053668d147d53fb8c4e0efe09c973"},