DEV Community

Weerasak Chongnguluam
Weerasak Chongnguluam

Posted on

1 1

asdf install Erlang with docs

Erlang เป็นอีกภาษาที่ทีมพัฒนาเขียน document เอาไว้ดีมากๆ มีให้ทั้งเป็น manpage, html, pdf และ chunks ที่เรียกดูได้จาก erl

ทีนี้ผมใช้ asdf เป็นเครื่องมือในการติดตั้ง Erlang ซึ่งจะไปใช้ kerl อีกที แล้วถ้าอยากให้มันติดตั้ง document ให้ด้วยต้องใส่ env ให้ถูกต้อง

แต่ว่าในหน้า README ของ asdf erlang plugin กับ kerl ดันบอกว่าให้ใส่แค่ env ตัวเดึยวคือตัวนี้

export KERL_BUILD_DOCS=yes
Enter fullscreen mode Exit fullscreen mode

แต่ลองแล้วก็ไม่เห็นจะได้ document แบบ manpage, html, pdf มาเลย แต่เจอว่าใช้งานผ่าน erl ได้

สุดท้ายไล่ดูโค้ดของ asdf erlang plugin กับ kerl จนเจอว่ามันต้องระบุประเภทของ format ของ document ด้วยผ่านอีก env คือ

export KERL_DOC_TARGETS="man html pdf chunks"
Enter fullscreen mode Exit fullscreen mode

ซึ่งใส่หลาย format ได้

เท่านี้ก็ลง Erlang ผ่าน asdf แล้วได้ document ครบทุกประเภทแล้ว

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay