Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kblohm committed May 12, 2018
1 parent 38b77b8 commit e137888
Show file tree
Hide file tree
Showing 166 changed files with 4,296 additions and 3,870 deletions.
4,647 changes: 2,347 additions & 2,300 deletions help/content/assets/css/main.css

Large diffs are not rendered by default.

391 changes: 251 additions & 140 deletions help/content/assets/css/style.css

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions help/content/assets/js/clipboardTooltip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
var snippets = document.querySelectorAll('.snippet, pre[class*="language-"]');

[].forEach.call(snippets, function (snippet) {
snippet.firstChild.insertAdjacentHTML('beforebegin', '<a class="btn" data-clipboard-snippet><i class="far fa-copy"></i></a>');
});
var clipboardSnippets = new ClipboardJS('[data-clipboard-snippet]', {
target: function (trigger) {
return trigger.nextElementSibling;
}
});
clipboardSnippets.on('success', function (e) {
e.clearSelection();
});


Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) {
var link = document.createElement('div');
link.innerHTML = '<a class="btn"><i class="far fa-copy"></i></a>'

if (!ClipboardJS) {
callbacks.push(registerClipboard);
} else {
registerClipboard();
}

return link;

function registerClipboard() {
var clip = new ClipboardJS(link, {
'text': function () {
return env.code;
}
});
}

});
26 changes: 26 additions & 0 deletions help/content/nuspec-example.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<package
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata
xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>@project@</id>
<version>@build.number@</version>
<authors>@authors@</authors>
<owners>@authors@</owners>
<summary>@summary@</summary>
<licenseUrl>https://github.com/octokit/octokit.net/blob/master/LICENSE.txt</licenseUrl>
<projectUrl>https://github.com/octokit/octokit.net</projectUrl>
<iconUrl>https://github.com/octokit/octokit.net/icon.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>@description@</description>
<releaseNotes>@releaseNotes@</releaseNotes>
<copyright>Copyright GitHub 2013</copyright>
<tags>GitHub API Octokit</tags>
@dependencies@
@references@

</metadata>
@files@

</package>
7 changes: 4 additions & 3 deletions help/markdown/api-slack.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Sending Notifications to a Slack Webhook

**Note: This documentation is for FAKE version 5.0 or later. The old documentation can be found [here](legacy-slacknotification.html)**
<div class="alert alert-info">
<h5>INFO</h5>
This documentation is for FAKE version 5.0 or later. The old documentation can be found <a href="legacy-slacknotification.html">here</a>
</div>

In this article you will learn how to create a [Slack](https://slack.com) webhook integration and send a notification to it. This article assumes that you already have a Slack team setup.

**Note: This documentation is for FAKE 5. The old documentation can be found [here](legacy-slacknotification.html)! **

[API-Reference](apidocs/v5/fake-api-slack.html)

## Adding a Webhook Integration to a Channel
Expand Down
71 changes: 48 additions & 23 deletions help/markdown/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,23 @@ It turns `*.md` (Markdown with embedded code snippets) and `*.fsx` files (F# scr
* Clone your personal fork locally.

* Add a new git remote in order to retrieve upstream changes.

git remote add upstream https://github.com/fsharp/FAKE.git
<pre>
<code class="lang-bash">
git remote add upstream https://github.com/fsharp/FAKE.git
</code>
</pre>

#### Build tools

* Windows users can install Visual Studio 2017 (the [Community Edition](https://www.visualstudio.com/de/vs/community/)
is freely available for open-source projects).

> Make sure to have long path enabled: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
> Otherwise the test-suite will fail (However, the build should work)
<div class="alert alert-info">
<h5>INFO</h5>
Make sure to have long path enabled: https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
Otherwise the test-suite will fail (However, the build should work)
</div>


* Linux and Mac users can read "[Guide - Cross-Platform Development with F#](http://fsharp.org/guides/mac-linux-cross-platform/)"
to find out the required tools.
Expand All @@ -52,16 +59,24 @@ It turns `*.md` (Markdown with embedded code snippets) and `*.fsx` files (F# scr
* Alternately, you can use [Vagrant](https://www.vagrantup.com/) in-pair with [VirtualBox](https://www.virtualbox.org/)
to automatically deploy a preconfigured virtual machine. See the [Vagrant docs](vagrant.html) to get in touch with the tool.

> Note: The vagrant file might be outdated at this time, please help updating it and removing this banner.
<div class="alert alert-warning">
<h5>WARNING</h5>
The vagrant file might be outdated at this time, please help updating it and removing this banner.
</div>
* Ubuntu / Windows Subsystem for Linux:

* Install Mono, as of today 2017-09-30 you need at least alpha to have the msbuild package (http://www.mono-project.com/download/beta/#download-lin)
* `apt-get install msbuild mono-complete`
* `apt-cache search libunwind`
* `# apt-get Install the libunwind runtime (one of the search results)`
* `apt-cache search libcurl # Install`
* `# apt-get Install the libcurl library (one of the search results)`
* `./build.sh`
* Run the following
<pre>
<code class="lang-bash">
apt-get install msbuild mono-complete
apt-cache search libunwind
# apt-get Install the libunwind runtime (one of the search results)
apt-cache search libcurl # Install
# apt-get Install the libcurl library (one of the search results)
./build.sh
</code>
</pre>

### Programming

Expand All @@ -70,8 +85,11 @@ It turns `*.md` (Markdown with embedded code snippets) and `*.fsx` files (F# scr
* Run the build via `fake run build.fsx` in order to check if everything works.

* Create a new feature branch.

git checkout -b myfeature
<pre>
<code class="lang-bash">
git checkout -b myfeature
</code>
</pre>

* Implement your bugfix/feature.

Expand All @@ -85,10 +103,13 @@ It turns `*.md` (Markdown with embedded code snippets) and `*.fsx` files (F# scr
Write "WIP" into the pull request description if it's not completely ready

* If you need to rebase you can do:

git fetch upstream
git rebase upstream/master
git push origin myfeature -f
<pre>
<code class="lang-bash">
git fetch upstream
git rebase upstream/master
git push origin myfeature -f
</code>
</pre>

* The pull request will be updated automatically.

Expand All @@ -98,9 +119,12 @@ It turns `*.md` (Markdown with embedded code snippets) and `*.fsx` files (F# scr

1. Create a local nuget package for the module you've changed.
e.g: Using dotnet cli

cd path/to/project
dotnet pack
<pre>
<code class="lang-bash">
cd path/to/project
dotnet pack
</code>
</pre>

2. Dotnet pack will create a default nuget package with version of 1.0.0 in the `bin/Debug` of your project. Set an additional paket source in your build script to this directory, and require this exact version in your paket references

Expand Down Expand Up @@ -177,8 +201,9 @@ Tooling in netcore it not optimal yet so some things have to be done by hand, bu
* Add the info about the new module to the `dotnetAssemblyInfos` variable in `build.fsx`. From this point on the build script will let you know if anything is missing. Again, if you have problems let us know.
* Mark the old module with the `Obsolete` attribute.

> Note that `src/Fake-netcore.sln` is currently not used (as IDEs don't support that yet). However it is used so speed up the build, `fake run build.fsx` will let you know what to do in the error message.
<div class="alert alert-info">
<h5>INFO</h5> <code>src/Fake-netcore.sln</code> is currently not used (as IDEs don't support that yet). However it is used so speed up the build, <code>fake run build.fsx</code> will let you know what to do in the error message.
</div>
These steps will ensure:

* People using the NuGet package will get the warnings to update the new API
Expand Down
38 changes: 20 additions & 18 deletions help/markdown/core-commandlineparsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ match DocoptResult.tryGetArgument "-m" results with
| Some arg -> printfn "%s" arg
```

A more sophisticated example can be in the fake runner: https://github.com/fsharp/FAKE/blob/64d871f5065412fe7b233025e454ccf3b89e46d7/src/app/Fake.netcore/Program.fs#L204-L259
A more sophisticated example can be found in the fake runner: https://github.com/fsharp/FAKE/blob/64d871f5065412fe7b233025e454ccf3b89e46d7/src/app/Fake.netcore/Program.fs#L204-L259

Or the target module:

Expand All @@ -55,31 +55,33 @@ You can also take a look at the test-suite:
- We return the arguments in the user given order in the result map (difference to `docopt.fs`)
- We parse arguments starting with `-` as positional arguments. For example consider:

```help
usage: prog (NAME | --foo NAME)
```bash
usage: prog (NAME | --foo NAME)

options: --foo
```

> Note that --foo has no argument because it was not specified in the options section!
options: --foo
```
<div class="alert alert-info">
<h5>INFO</h5>
<p>Note that --foo has no argument because it was not specified in the options section!</p>
</div>

In this scenario `prog --foo 10` is parsed as `--foo` and `NAME` argument because that is the only option. However `prog --foo=10` is parsed as `NAME` argument without any `--foo` option. Usually to prefer `--foo` you should put it first in the usage string:
In this scenario `prog --foo 10` is parsed as `--foo` and `NAME` argument because that is the only option. However `prog --foo=10` is parsed as `NAME` argument without any `--foo` option. Usually to prefer `--foo` you should put it first in the usage string:

```help
usage: prog (--foo NAME | NAME)
```bash
usage: prog (--foo NAME | NAME)

options: --foo
```
options: --foo
```

However, in this particular case it doesn't make any difference.
- `[]` is not inherited for all items, only for the group. To have all items optional use `[]` on every item. For example `usage: prog [go go]` means to have either two `go` or none. A single one is not allowed.
- We do not merge external "options" in the usage string with `[options]`. For example:

```help
usage: prog [options] [-a]
```bash
usage: prog [options] [-a]

options: -a
-b
```
options: -a
-b
```

Means that `-a` is actually allowed twice.
Means that `-a` is actually allowed twice.
5 changes: 4 additions & 1 deletion help/markdown/core-process.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Starting processes in "FAKE - F# Make"

**Note: This documentation is for FAKE 5! **
<div class="alert alert-info">
<h5>INFO</h5>
<p>This documentation is for FAKE version 5.0 or later.</p>
</div>

[API-Reference](apidocs/v5/fake-core-process.html)

Expand Down
43 changes: 31 additions & 12 deletions help/markdown/core-targets.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Running targets in "FAKE - F# Make"

**Note: This documentation is for FAKE 5. The old documentation can be found [here](legacy-core-targets.html)! **
<div class="alert alert-info">
<h5>INFO</h5>
<p>This documentation is for FAKE version 5.0 or later. The old documentation can be found <a href="legacy-core-targets.html">here</a></p>
</div>

[API-Reference](apidocs/v5/fake-core-target.html), [Operators](apidocs/v5/fake-core-targetoperators.html)

## Command line interface for the target module

If you use the `Fake.Core.Target` module and call `Target.runOrDefault` or `Target.runOrList` in your build script you will have the following CLI options:

```help
```bash
Usage:
fake-run --list
fake-run --version
Expand All @@ -24,7 +27,10 @@ Target Module Options [target_opts]:
-p, --parallel <num> Run parallel with the given number of tasks.
```
> please refer to the general [FAKE 5 runner command line interface](fake-commandline.html) or the [Fake.Core.CommandLineParsing documentation](core-commandlineparsing.html) for details.
<div class="alert alert-info">
<h5>INFO</h5>
<p>Please refer to the general <a href="fake-commandline.html">FAKE 5 runner command line interface</a> or the <a href="core-commandlineparsing.html">Fake.Core.CommandLineParsing documentation</a></p>
</div>
This means you can - for example - run `fake run build.fsx --list`
or `fake build --list` to list your targets.
Expand All @@ -33,12 +39,18 @@ To run a target `MyTarget` you could use `fake run build.fsx -t MyTarget` or `f
All parameters after `--` or `target <target>` are given to the target as paramters. Note that this feature needs to be enabled by using `Target.runOrDefaultWithArguments` instead of `Target.runOrDefault`!
> Note that the ordering of the parameters matters! This means the following are invalid (which is different to pre FAKE 5 versions):
> - `fake run -t Target build.fsx` - because of ordering fake will assume `-t` to be the script name
> - `fake build -v` - It will not run FAKE in verbose mode but give the parameter `-v` to the target parameters. This is because there is no `-v` in the above CLI.
>
> In general you should use the command-line in a way to not be broken when new parameters are added.
> Use longer forms in your scripts and shorter forms on your shell!
<div class="alert alert-info">
<h5>INFO</h5>
<p>Note that the ordering of the parameters matters! This means the following are invalid (which is different to pre FAKE 5 versions):
<ul>
<li><code>fake run -t Target build.fs</code> - because of ordering fake will assume <code>-t</code> to be the script name </li>
<li> <code>fake build -v</code> - It will not run FAKE in verbose mode but give the parameter <code>-v</code> to the target parameters. This is because there is no <code>-v</code> in the above CLI.</li>
</ul>
In general you should use the command-line in a way to not be broken when new parameters are added.
Use longer forms in your scripts and shorter forms on your shell!</p>
</div>
## Running specific targets
Expand Down Expand Up @@ -74,9 +86,16 @@ open Fake.Core.TargetOperators
Target.runOrDefault "Deploy"
```
> Warning: Previous versions of FAKE 5 used `(fun () -> ...)` instead of `(fun _ -> ...)`.
> We decided to change the syntax here to introduce some parameters or other features at a later point.
> Using the current parameter object is not supported yet.
<div class="alert alert-warning">
<h5>WARNING</h5>
<p>
Previous versions of FAKE 5 used <code>(fun () -> ...)</code> instead of <code>(fun _ -> ...)</code>.
We decided to change the syntax here to introduce some parameters or other features at a later point.
Using the current parameter object is not supported yet.
</p>
</div>
Now we have the following options:
Expand Down
5 changes: 4 additions & 1 deletion help/markdown/dotnet-assemblyinfo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Generating AssemblyInfo files

**Note: This documentation is for FAKE.exe after version 5. The documentation for previous version (<=4) can be found [here](legacy-assemblyinfo.html)! **
<div class="alert alert-info">
<h5>INFO</h5>
<p>This documentation is for FAKE version 5.0 or later. The old documentation can be found <a href="legacy-assemblyinfo.html">here</a></p>
</div>

In this article the AssemblyInfo task is used in order to set specific version information to .NET assemblies.

Expand Down
Loading

0 comments on commit e137888

Please sign in to comment.