You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sharing/index.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,9 +48,20 @@ t("MyAwesomePackage")
48
48
```
49
49
50
50
Then, you simply need to push this new folder to the remote repository <https://github.com/myuser/MyAwesomePackage.jl>, and you're ready to go.
51
+
52
+
The steps described above, including creation of a GitHub repo and pushing your project to it, can also be comfortably done with the help of [PackageMaker.jl](https://github.com/Eben60/PackageMaker.jl), which is a graphical wrapper around [PkgTemplates.jl](https://github.com/JuliaCI/PkgTemplates.jl) with a couple features of its own.
53
+
51
54
The rest of this post will explain to you what each part of this folder does, and how to bend them to your will.
52
55
53
-
To work on the package further, we develop it into the current environment and import it:
56
+
To work on the package further, we switch to it's environment or "develop" it into the current one, and then import it:
57
+
58
+
```julia-repl
59
+
julia> using Pkg # remember, you can equivalently do all that from the pkg REPL after pressing ]
Copy file name to clipboardExpand all lines: writing/index.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -355,8 +355,8 @@ Once in an environment, the packages you `]add` will be listed in two files `som
355
355
*`Manifest.toml` contains the exact versions of all direct and indirect dependencies
356
356
357
357
If you haven't entered any local project, packages will be installed in the default environment, called `@v1.X` after the active version of Julia (note the `@` before the name).
358
-
Packages installed that way are available no matter which local environment is active, because of "environment stacking".
359
-
It is therefore recommended to keep the default environment very light, containing only essential development tools.
358
+
Packages installed that way are available no matter which local environment is active, because of "environment [stacking](https://docs.julialang.org/en/v1/manual/code-loading/#Environment-stacks)".
359
+
It is recommended to keep the default environment very light to avoid dependencies conflicts. It should contain only essential development tools.
360
360
361
361
\vscode{
362
362
@@ -380,7 +380,7 @@ Once your code base grows beyond a few scripts, you will want to [create a packa
380
380
The first advantage is that you don't need to specify the path of every file: `using MyPackage: myfunc` is enough to get access to the names you define.
381
381
Furthermore, you can specify versions for your package and its dependencies, making your code easier and safer to reuse.
382
382
383
-
To create a new package locally, the easy way is to use `]generate` (we will discuss a more sophisticated workflow in the next blog post).
383
+
To create a new package locally, one easy way is to use `]generate`. We will discuss more sophisticated workflows, including a graphical tool, in the next blog post.
@@ -428,7 +428,7 @@ Whenever you edit a source file and hit save, the REPL will update its state acc
428
428
429
429
\vscode{
430
430
431
-
The Julia extension imports Revise.jl by default when it starts a REPL.
431
+
The Julia extension imports Revise.jl by default when it starts a REPL, provided it is installed in the default environment.
432
432
433
433
}
434
434
@@ -462,6 +462,9 @@ using MyPackage
462
462
MyPackage.myfunc()
463
463
```
464
464
465
+
For the common case of dependencies needed for interactive work only, [shared](https://pkgdocs.julialang.org/v1/environments/#Shared-environments) or [stacked](https://docs.julialang.org/en/v1/manual/code-loading/#Environment-stacks) environments are another practical solution.
466
+
[ShareAdd.jl](https://github.com/Eben60/ShareAdd.jl) can help you in using and managing these (see its documentation).
0 commit comments