-
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1055: Backports for Pkg 1.1.3 r=fredrikekre a=fredrikekre Co-authored-by: David Varela <00.varela.david@gmail.com> Co-authored-by: Florian Heiderich <florian@heiderich.org> Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Curtis Vogt <curtis.vogt@gmail.com> Co-authored-by: Nicholas Bauer <nicholasbauer@outlook.com> Co-authored-by: Tamas K. Papp <tkpapp@gmail.com> Co-authored-by: Kristoffer Carlsson <kcarlsson89@gmail.com>
- Loading branch information
Showing
18 changed files
with
261 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,6 @@ | |
docs/build | ||
/Manifest.toml | ||
/docs/Manifest.toml | ||
/docs/src/repl.md | ||
.DS_Store | ||
/test/registries/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This file is a part of Julia. License is MIT: https://julialang.org/license | ||
|
||
## generate repl-docs ## | ||
|
||
function generate(io, command) | ||
println(io, """ | ||
```@raw html | ||
<section class="docstring"> | ||
<div class="docstring-header"> | ||
<a class="docstring-binding" id="repl-$(command)" href="#repl-$(command)"> | ||
<code>$(replace(command, "-" => " "))</code> | ||
</a> | ||
— | ||
<span class="docstring-category">REPL command</span> | ||
. | ||
</div> | ||
``` | ||
```@eval | ||
using Pkg | ||
Pkg.REPLMode.CommandSpec("$(command)").help | ||
``` | ||
```@raw html | ||
</section> | ||
``` | ||
""") | ||
end | ||
function generate() | ||
io = IOBuffer() | ||
println(io, """ | ||
# [**9.** REPL Mode Reference](@id REPL-Mode-Reference) | ||
This section describes available commands in the Pkg REPL. | ||
The REPL mode is mostly meant for interactive use, | ||
and for non-interactive use it is recommended to use the | ||
"API mode", see [API Reference](@ref API-Reference). | ||
""") | ||
# list commands | ||
println(io, "## `package` commands") | ||
foreach(command -> generate(io, command), ["add", "build", "develop", "free", "generate", "pin", "remove", "test", "update"]) | ||
println(io, "## `registry` commands") | ||
foreach(command -> generate(io, command), ["registry-add", "registry-remove", "registry-status", "registry-update"]) | ||
println(io, "## Other commands") | ||
foreach(command -> generate(io, command), ["activate", "gc", "help", "instantiate", "precompile", "resolve", "status"]) | ||
# write to file | ||
write(joinpath(@__DIR__, "src", "repl.md"), seekstart(io)) | ||
return | ||
end | ||
|
||
generate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.