How can I contribute to a package?

Hi,

I’d like to contribute to one package, adapting it to elm 0.19: https://github.com/rluiten/elm-date-extra/issues/71

but I don’t know what are the steps for doing this. I have a project that uses that library, and I’d like to test it on that project. How should I clone the repo and use it in my project?

A guide for contributing to packages would be great.

Thanks!

I’d suggest:

  • Adding a comment to that issue saying you’re interested in helping update to 0.19 and asking if a pull request would be welcome
  • Discussing proposed changes/updates with the maintainer (since Elm’s date/time handling has changed dramatically since 0.18, it looks like it will not be a simple update)

To test your updates to elm-date-extra on your own project (assuming that project is an app, and not a package itself), I would do something like:

  • Fork elm-date-extra to your own GitHub account and start a new update-to-0.19 or similar branch in it (making pull requests from a branch is much nicer than from master)
  • Start updating to Elm 0.19 in your branch
  • When you’re reading for testing, add a line to source-directories in your app’s elm.json that contains the relative path to the src directory of your elm-date-extra checkout, e.g. "../elm-date-extra/src". This will effectively include the source files of elm-date-extra in your app so you can use it without having it as a dependency (so you’ll also need to remove it from your dependencies field).

If elm-date-extra had any dependencies of its own, you’d also need to add those to your app’s elm.json, but it doesn’t so you should be good.

3 Likes

thanks a lot for your help @ianmackenzie!

Np - hope it works out!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.