Project nested environments

I have a package with an examples folder inside of it. I want the examples folder to have its own Project.toml with things like Plots that I don’t want as dependencies in the package itself. I created an environment in the examples folder but how do I add to the examples environment the main package itself?
I.e. the directory would look like this

\SamplePackage\src\SamplePackage.jl 
\SamplePackage\Project.toml
\SamplePackage\examples\examplescript.jl 
\SamplePackage\examples\Project.toml

And then inside examplescript.jl I wanna use the package like this.

using SamplePackage 
using Plots 

#script code...

Where Plots isn’t part of the SamplePackage environment

In the examples environment, simply run

(examples) pkg>develop .

Here “.” would be the path to SamplePackage folder assuming you started Julia in that folder.

1 Like

Thanks so much. I did that and it worked perfectly. Just has the reference to the directory above it. Didn’t realize I had to use “develop” instead of “add”