# Make your Julia package in 10 minutes

**URL:** <https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368>\
**Category:** Teaching & Outreach\
**Tags:** package, first-steps\
**Created:** [June 14, 2020, 11:59am UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368 "2020-06-14T11:59:32Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [June 14, 2020, 11:59am UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/1 "2020-06-14T11:59:32Z")

</div>

I built my blog some time ago using [Franklin.jl](https://franklinjl.org/) and Bootstrap, and I was just waiting for the suitable blogpost material.

It’s a common question here how to make your own package, so I decided to write a post about it. Here it is:

> **[Make your Julia package in 10 minutes · Zlatan's Journal](https://zlatanvasovic.github.io/blog/2020/06/make-your-julia-package/)**
>
> Making a package can be a hassle, but in Julia it doesn't have to be so. — An exploratory journey into interdisciplinary research. Created by Zlatan Vasović.

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [June 14, 2020, 1:04pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/2 "2020-06-14T13:04:44Z")

</div>

Very nice! Great to have more simple tutorials out there in the world. One thing I noticed: in your package code, you have the exports at the end of the module. I think conventionally they go right after the module is declared.

Of course both work, but I think it would be good to have idiomatic code in beginner tutorials as much as possible.

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [June 14, 2020, 1:32pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/4 "2020-06-14T13:32:04Z")

</div>

I second @kevbonham. I believe it is OK to go the idiomatic way and explain that in your blog. A beginner will read your tutorial and be even more confused because you do it differently than done elsewhere. At least I would.

---

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [June 14, 2020, 1:32pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/5 "2020-06-14T13:32:12Z")

</div>

![image](https://global.discourse-cdn.com/julialang/original/3X/2/b/2bc9322a68deb052aa96c7f61fea156bce51986a.png)

Something is wrong with formatting, it’s looks weird in chrome on iPhone.

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [June 14, 2020, 1:53pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/6 "2020-06-14T13:53:03Z")

</div>

@mzaffalon @kevbonham I added an explanation. Is this what you had in mind?

@Skoffer thanks, page’s width was set to 50% for all screens instead of large ones only. It should be fine now.

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [June 14, 2020, 2:24pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/7 "2020-06-14T14:24:33Z")

</div>

Yes.

As a remark: you can drop the term `(-φ)^-n/sqrt(5)` because it is smaller than 1/4 for all n\>0.

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [June 14, 2020, 2:30pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/8 "2020-06-14T14:30:58Z")

</div>

That’s true, great suggestion for readers. 😄

I left that part out because it didn’t fit into the “Suppose you came up with the formula to calculate n-th term of the famed Fibonacci series” idea.

---

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [June 14, 2020, 3:14pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/9 "2020-06-14T15:14:57Z")

</div>

Nicely done - that looks useful to me!

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [June 14, 2020, 8:18pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/10 "2020-06-14T20:18:01Z")

</div>

Glad to see Julia being very international 🙂

 ![Screenshot from 2020-06-16 01-04-47](https://global.discourse-cdn.com/julialang/original/3X/4/0/40d41da5665c7f581e49b6ae04aef83fdd413457.png)  
(based on pageviews)

---

<div class="post-metadata">

**Author:** ![miguelraz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miguelraz/32/631_2.png) [@miguelraz](https://discourse.julialang.org/u/miguelraz)\
**Post date:** [June 15, 2020, 11:46pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/11 "2020-06-15T23:46:43Z")

</div>

Oh! How do you look at pageviews?

---

<div class="post-metadata">

**Author:** ![gautam.salhotra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gautam.salhotra/32/11673_2.png) [@gautam.salhotra](https://discourse.julialang.org/u/gautam.salhotra)\
**Post date:** [June 16, 2020, 5:44am UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/12 "2020-06-16T05:44:02Z")

</div>

Thanks, this is a very useful page! I created my first package with these instructions.

Most likely, our custom packages will have dependencies. Could you also add instructions for adding a dependency, and how to update `Project.toml` and `Manifest.toml` accordingly?

Additionally, if you want to show-off your shiny new package to others, how would you ensure that the package compiles only once and doesn’t recompile every time? AFAIK it does not re-compile if `Manifest.toml` stays the same. But this info would be very important from day-to-day use of our package.

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [June 16, 2020, 8:47am UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/13 "2020-06-16T08:47:26Z")

</div>

> [@miguelraz](#):
>
> Oh! How do you look at pageviews?

I use Google Analytics for that, but any other similar service will do. You just need to own the web page to put Google Analytics on it.

> [@gautam.salhotra](#):
>
> Thanks, this is a very useful page! I created my first package with these instructions.

I’m very glad for this! 😄

> [@gautam.salhotra](#):
>
> Most likely, our custom packages will have dependencies. Could you also add instructions for adding a dependency, and how to update `Project.toml` and `Manifest.toml` accordingly?

Added to the post, please check it out.

> [@gautam.salhotra](#):
>
> Additionally, if you want to show-off your shiny new package to others, how would you ensure that the package compiles only once and doesn’t recompile every time? AFAIK it does not re-compile if `Manifest.toml` stays the same. But this info would be very important from day-to-day use of our package.

`Manifest.toml` shouldn’t be manually edited. I think you are right about re-compiling, but I’d need confirmation for that info from someone more experienced. If someone is up to it, they could actually write a post about compiling in Julia.  
Edit: for anyone wondering about the same issue, there is a thread about it: [Is it correct that it recompiles packages every time a new REPL is opened?](https://discourse.julialang.org/t/is-it-correct-that-it-recompiles-packages-every-time-a-new-repl-is-opened/30266).

---

<div class="post-metadata">

**Author:** ![Gus\_Hart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gus_hart/32/6987_2.png) [@Gus\_Hart](https://discourse.julialang.org/u/Gus_Hart)\
**Post date:** [July 8, 2020, 11:05pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/14 "2020-07-08T23:05:11Z")

</div>

This was really useful. Thanks. How about extending it to putting the package up on github and adding automatic testing? (I’ll see if I can figure it out myself…)

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [July 9, 2020, 1:07am UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/15 "2020-07-09T01:07:50Z")

</div>

This video I made is relevant too [Why Julia - Package Development in Under 4 Minutes - YouTube](https://www.youtube.com/watch?v=vVywlAgyedI)  
It’s part of the Why Julia series

---

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [September 10, 2020, 11:30am UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/17 "2020-09-10T11:30:47Z")

</div>

URL changed to [https://zlatanvasovic.github.io/blog/2020/06/make-your-julia-package/](https://zlatanvasovic.github.io/blog/2020/06/make-your-julia-package/), but it seems I can’t edit the original post anymore.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [September 12, 2020, 6:05pm UTC](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368/18 "2020-09-12T18:05:16Z")

</div>

Link in the original post has been updated.
