Pluto.jl
Pluto.jl copied to clipboard
Feat: serialize `Pluto`.`activate_notebook_environment` to allow running Pluto notebooks as scripts
Towards: https://github.com/fonsp/Pluto.jl/discussions/2572#discussioncomment-6008940
Try this Pull Request!
Open Julia and type:
julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="pg/serialize-pkg")
julia> using Pluto
Wouldn't this break packages that use notebooks as included files (unless they explicitly avoid using PlutoPkg).
I didn't try the PR but it would seem from the code that when included outside of Pluto this would create, activate and instantiate the notebook environment instead of the one of the including package
Yes that is a good point. We probably want something more sophisticated here.