pxp9

pxp9

Is there a way of deactivate `Pheonix.Liveview.Component.attr` documentation generation?

 attr :rest, :global
  slot :inner_block

  def navbar(assigns) do
    assigns = join_classes_with_rest(assigns, ["navbar"])

    ~H"""
    <div {@rest}>
      {render_slot(@inner_block)}
    </div>
    """
  end

I got this Liveview component and this documentation is being generated by default

iex(4)> Code.fetch_docs(DaisyUIComponents.Navbar)
{:docs_v1, 2, :elixir, "text/markdown",
 %{"en" => "Navbar component\n\nhttps://daisyui.com/components/navbar/\n\n\n"},
 %{},
 [
   {{:function, :__components__, 0}, [generated: true, location: 1],
    ["__components__()"], :hidden, %{}},
   {{:function, :navbar, 1}, [generated: true, location: 15],
    ["navbar(assigns)"],
    %{
      "en" => "## Attributes\n\n* Global attributes are accepted.\n## Slots\n\n* `inner_block`\n"
    }, %{}},

Is there a way to deactivate this documentation generation ?

First Post!

sodapopcan

sodapopcan

I’m super curious to know what your use-case is here… do you just don’t want them showing up in ex_do? …do you want it completely out of the release? For releases, docs are stripped by default. If you don’t want them showing up in ex_doc you can add @doc false to the function. It’s possible neither of these are what you’re looking for, though.

Last Post!

pxp9

pxp9

Hello, the use case is because I want to generate it by myself with my library lazy_doc but my library detects if a function is not documented via Code.fetch_docs and the Liveview docs seems they are generated at compile time via attr and slot Macros.

So when I execute lazy_doc the file is already compiled with the Liveview docs so my library does not detect them as something to be generated.

@doc false is not a solution because my library also thinks when you encounter a @doc false you want hidden documentation so my library does not touch it.

Btw if you are curious, you can check my blog post about the library in my blog.

Where Next?

Popular in Questions Top

Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31494 112
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement