How I learned to stop worrying and love Hex.pm

A7be9e756c24b601e6010886fe74430d?s=47 Darian Moody
February 24, 2016

How I learned to stop worrying and love Hex.pm

Publishing a package in the Elixir ecosystem is simple and this talk is designed to showcase that - to rid you of any worry that packaging your project will be a time sink.

It covers:

* What is Hex.pm?
* The minimum steps required to make an Elixir package ready
* The publishing step
* Generating docs with ex_doc and pushing them to Hexdocs
* Some extra Hex, docs & packaging related tips

A7be9e756c24b601e6010886fe74430d?s=128

Darian Moody

February 24, 2016
Tweet

Transcript

  1. HOW I LEARNED TO STOP WORRYING AND LOVE... HEX.PM

  2. Darian Moody @djm_

  3. @djm_ Why am I here? ..Totally got this one.

  4. @djm_ HEX.PM PUBLISH TO

  5. @djm_ My aim?

  6. @djm_ Have you published to Hex?

  7. @djm_ Why worry? ..you big baby!

  8. @djm_

  9. @djm_ distutils setuptools distribute distutils2 bento virtualenv setup.py MANIFEST.in setup.cfg

    requirements.txt easy_install pip
  10. @djm_

  11. @djm_ Elixir has nuked these problems ..dead as a dodo.

  12. @djm_ How? • Project structure • Tooling there from the

    start • Project level deps (PDM)
  13. @djm_ i. Hex Ready ii. Push to Hex iii.Hexdocs THE

    MASTERPLAN
  14. @djm_ $ mix new project_name SCRATCH STARTING FROM

  15. @djm_ $ mix hex.build

  16. @djm_ /mix.exs

  17. @djm_ Add a description /mix.exs

  18. @djm_ /mix.exs Add package meta

  19. @djm_ /mix.exs Files included by default

  20. @djm_ $ mix hex.build

  21. @djm_ i. Fit for Hex ii. Push to Hex iii.Hexdocs

    THE MASTERPLAN
  22. @djm_ PUBLISH BEFORE WE

  23. @djm_ $ mix hex.user register

  24. @djm_ $ mix hex.publish

  25. @djm_ i. Fit for Hex ii. Push to Hex iii.Hexdocs

    THE MASTERPLAN
  26. @djm_ HEXDOCS PUSHING TO

  27. @djm_ NEUTRAL DOC PACKAGE • Implement `mix docs` • Generate

    HTML into /doc • Generate an index.html Must:
  28. @djm_ ex_doc

  29. @djm_ /mix.exs Add exdoc deps

  30. @djm_ DOCS ADD SOME They look like this:

  31. @djm_ $ mix deps.get DOCS GENERATE THE $ mix docs

  32. @djm_ # OSX $ open doc/index.html # Linux $ xdc-open

    doc/index.html
  33. @djm_ PUBLISH LET'S $ mix hex.docs

  34. @djm_ i. Fit for Hex ii. Push to Hex iii.Hexdocs

    THE MASTERPLAN
  35. @djm_ TIPS SOME HANDY

  36. @djm_ $ mix hex.config cdn_url <url> EU > Ireland Asia

    > Singapore FASTER HEX
  37. @djm_ UMBRELLA USE AN

  38. @djm_ DOCS CAN HAVE A LOGO & PAGES

  39. @djm_

  40. Darian Moody @djm_ Questions?