Package for faster prototyping without widespread implications for your Julia default installation.
- Activates a temporary project when the module is loaded.
- Enables offline mode when the module is loaded for a faster package adding. Locally installed packages will be reused.
- Provides a macro to load and install a package:
@reuse PackageA
or@reuse PackageA PackageB
. - Output of
@reuse
can be suppressed by callingDraft.silent()
. Undo withDraft.silent(false)
. - Provides a function to switch back to online mode:
Draft.online()
. - Provides a function to save the temporary Project.toml file to a target location:
save_environment(target_dir)
.
] add https://github.com/feanor12/Draft.jl
or
import Pkg
Pkg.add(url="https://github.com/feanor12/Draft.jl")
# enable / load Draft
using Draft
# load StaticArrays and Unitful (works only if locally available)
@reuse StaticArrays Unitful
# save temporary environment
save_environment("./my_project")
If you want this package to be loaded by default, install it in your base environment and add
using Draft
to the .julia/config/startup.jl
file.