2018 Update: Be sure to check all the responses, as the answer to this question has changed multiple times over the years. At the time of this update, the <
I wanted to create a new module from scratch, and tried the different answers with 1.0 and didn’t get a satisfactory result, but I found the following worked for me:
From the Julia REPL in the directory I want to use for my project I run
pkg> generate MyModule
This creates a subdirectory like the following structure:
MyModule
├── Project.toml
└── src
└── MyModule.jl
I put my module code in MyModule.jl
. I change to the directory MyModule
(or open it in my IDE) and add a file Scratch.jl
with the following code:
Pkg.activate(“.”)
using Revise
import MyModule
Then I can add my code to test below and everything updates without reloading the REPL.