Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions sharing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ Do not insert any files like `README.md`, `.gitignore` or `LICENSE.md`, this wil
Indeed, we can leverage [PkgTemplates.jl](https://github.com/JuliaCI/PkgTemplates.jl) to automate package creation (like `]generate` from Pkg.jl but on steroids).
The following code gives you a basic file structure to start with:

```>pkgtemplates
```>pkgtemplates1
using PkgTemplates
dir = Utils.path(:site) # replace with the folder of your choice
t = Template(dir=dir, user="myuser", interactive=false);
t = Template(user="myuser", interactive=false);
```

```!pkgtemplates2
#hideall
t = Template(dir=Utils.path(:site), user="myuser", interactive=false);
```

```>pkgtemplates3
t("MyAwesomePackage")
```

Expand All @@ -45,12 +52,23 @@ The rest of this post will explain to you what each part of this folder does, an

To work on the package further, we develop it into the current environment and import it:

```>using-awesome
```julia-repl
julia> using Pkg

julia> Pkg.develop(path="MyAwesomePackage")
```

```!using-awesome1
#hideall
using Pkg
Pkg.develop(path=sitepath("MyAwesomePackage")) # ignore sitepath
```

```>using-awesome2
using MyAwesomePackage
```


## GitHub Actions

The most useful aspect of PkgTemplates.jl is that it automatically generates workflows for [GitHub Actions](https://docs.github.com/en/actions/quickstart).
Expand Down
Loading