https://github.com/feanor12/draft.jl
A small package to automatically create temporary environments in offline mode.
https://github.com/feanor12/draft.jl
julia julia-language prototyping
Last synced: about 1 year ago
JSON representation
A small package to automatically create temporary environments in offline mode.
- Host: GitHub
- URL: https://github.com/feanor12/draft.jl
- Owner: feanor12
- License: mit
- Created: 2022-04-04T18:52:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-05T16:28:32.000Z (about 4 years ago)
- Last Synced: 2025-03-31T06:51:12.684Z (about 1 year ago)
- Topics: julia, julia-language, prototyping
- Language: Julia
- Homepage:
- Size: 26.4 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Draft (WIP)
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 calling `Draft.silent()`. Undo with `Draft.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)`.
## Install
```julia
] add https://github.com/feanor12/Draft.jl
```
or
```julia
import Pkg
Pkg.add(url="https://github.com/feanor12/Draft.jl")
```
## First Steps
``` julia
# enable / load Draft
using Draft
# load StaticArrays and Unitful (works only if locally available)
@reuse StaticArrays Unitful
# save temporary environment
save_environment("./my_project")
```
## Persistent usage
If you want this package to be loaded by default, install it in your base environment and add
```julia
using Draft
```
to the `.julia/config/startup.jl` file.