Skip to content

Commit

Permalink
More github docs - references #112
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Sep 17, 2014
1 parent 982c034 commit c0336bd
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Paket.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D
docs\content\convert_from_nuget.md = docs\content\convert_from_nuget.md
docs\content\dependencies_file.md = docs\content\dependencies_file.md
docs\content\faq.md = docs\content\faq.md
docs\content\github_dependencies.md = docs\content\github_dependencies.md
docs\content\index.md = docs\content\index.md
docs\content\lock_file.md = docs\content\lock_file.md
docs\content\nuget_dependencies.md = docs\content\nuget_dependencies.md
docs\content\paket_install.md = docs\content\paket_install.md
docs\content\paket_outdated.md = docs\content\paket_outdated.md
docs\content\paket_update.md = docs\content\paket_update.md
Expand Down
6 changes: 4 additions & 2 deletions docs/content/dependencies_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ To give you an overview, this is what Paket's `paket.dependencies` file looks li
nuget "FAKE" "~> 3.4"
nuget "FSharp.Formatting" "~> 2.4"
nuget "DotNetZip" "~> 1.9.3"
nuget "SourceLink.Fake" "~> 0.3"
nuget "SourceLink.Fake" "~> 0.3"
github forki/FsUnit FsUnit.fs // Only in 0.2.0 alpha versions

The syntax looks familiar to users of Ruby's [bundler](http://bundler.io/) [Gemfile](http://bundler.io/gemfile.html). This is intended because it proved to work well for the authors of Paket.

The file specifies that Paket's dependencies should be downloaded from [nuget.org](http://www.nuget.org) and that we need e.g. [`FAKE`](http://fsharp.github.io/FAKE/) [in version `3.4 <= x < 3.5`](#pessimistic-version-constraint) as a build tool.
The file specifies that Paket's dependencies should be downloaded from [nuget.org](http://www.nuget.org) and that we need e.g.
[`FAKE`](http://fsharp.github.io/FAKE/) [in version `3.4 <= x < 3.5`](#pessimistic-version-constraint) as a build tool.

Only direct dependencies should be listed. Paket uses this definition to compute a concrete dependency resolution, which also includes indirect dependencies. The resulting dependency graph is then persisted to the [`paket.lock` file](lock_file.html).

Expand Down
2 changes: 1 addition & 1 deletion docs/content/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Paket on the other hand maintains this information on a consistent and stable ba

The [`paket outdated` command](paket_outdated.html) lists packages that have new versions available.

Future versions of Paket will also enable one to [reference files directly from git repositories](https://github.com/fsprojects/Paket/issues/9).
Paket also enables one to [reference files directly from GitHub repositories](github_dependencies.html).

## I'm already using NuGet. How can I convert to Paket?

Expand Down
25 changes: 22 additions & 3 deletions docs/content/github_dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,29 @@

** Only in [0.2.0 alpha versions](https://www.nuget.org/packages/Paket/0.2.0-alpha001) **

Paket allows to link files from [Github.com](http://www.github.com) into your projects.
Paket allows to link files from [github.com](http://www.github.com) into your projects.

## Referencing a single file

You can reference a single file from [Github.com](http://www.github.com) simply by specifying the source repository and the file name in the [`paket.dependencies` file](dependencies_file.html):
You can reference a single file from [github.com](http://www.github.com) simply by specifying the source repository and the file name in the [`paket.dependencies` file](dependencies_file.html):

github forki/FsUnit FsUnit.fs
github forki/FsUnit FsUnit.fs

If you run the [`paket update` command](paket_update.html), then it will add a new section to your [`paket.lock` file](lock_file.html):

[lang=batchfile]
GITHUB
remote: forki/FsUnit
specs:
FsUnit.fs (7623fc13439f0e60bd05c1ed3b5f6dcb937fe468)

As you can see the file is pinned to a concrete commit. This allows you to reliably use the same file version in succeeding builds.

If you want to reference the file in one of your project files then add an entry to the project's [`paket.references` file.](references_files.html):

[lang=batchfile]
File:FsUnit.fs

This will reference the linked file directly into your project.

![alt text](img/github_reference.png "Github file referenced in project")
2 changes: 1 addition & 1 deletion docs/content/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# What is Paket?

Paket is a dependency manager for .NET and [Mono][mono] projects, which is designed to work well with [NuGet][nuget] packages.
Paket is a dependency manager for .NET and [Mono][mono] projects, which is designed to work well with [NuGet][nuget] packages and also allows to [reference files directly from GitHub repositories](github_dependencies.html).
It enables precise and predictable control over what packages the projects within your application reference. More details are in the [FAQ](faq.html).

[mono]: http://www.mono-project.com/
Expand Down
Binary file added docs/files/img/github_reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/tools/templates/template.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
<li><a href="@Root/dependencies_file.html">paket.dependencies</a></li>
<li><a href="@Root/lock_file.html">paket.lock</a></li>
<li><a href="@Root/references_files.html">paket.references</a></li>
<li class="divider"></li>
<li><a href="@Root/nuget_dependencies.html">NuGet dependencies</a></li>
<li><a href="@Root/github_dependencies.html">GitHub dependencies</a></li>
<li class="divider"></li>
<li><a href="@Root/reference/index.html">API Reference</a></li>

<li class="nav-header">Paket commands</li>
Expand Down

0 comments on commit c0336bd

Please sign in to comment.