From 61d0354c701496f18496b557dc469e2f14553c8b Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 16:21:52 +0200 Subject: [PATCH 01/11] Fix two issues with .gitignore and ignored files. Details: - Do not ignore docs/content/paket-folder.md. - Remove the auto-generated docs/content/paket-config.md file from git, which was already ignored via .gitignore, but not removed from the index. --- .gitignore | 1 + docs/content/paket-config.md | 21 --------------------- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 docs/content/paket-config.md diff --git a/.gitignore b/.gitignore index 8903bc461c..d6515cdca5 100644 --- a/.gitignore +++ b/.gitignore @@ -183,5 +183,6 @@ docs/content/license.md docs/content/release-notes.md _NCrunch_Paket docs/content/paket-*.md +!docs/content/paket-folder.md *.bak System.Management.Automation.dll \ No newline at end of file diff --git a/docs/content/paket-config.md b/docs/content/paket-config.md deleted file mode 100644 index dbd43a0ac6..0000000000 --- a/docs/content/paket-config.md +++ /dev/null @@ -1,21 +0,0 @@ -# paket config - -Allows to store global configuration values like NuGet credentials. - - [lang=batchfile] - $ paket config [add-credentials ] - -Options: - - - `add-credentials `: Add credentials for the specified Nuget feed - -Paket will then ask for username and password. - -This credentials will be used if no username and password for the source are configured in the [`paket.dependencies` file](nuget-dependencies.html). - -The configuration file can be found in: - - let AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) - let PaketConfigFolder = Path.Combine(AppDataFolder, "Paket") - let PaketConfigFile = Path.Combine(PaketConfigFolder, "paket.config") \ No newline at end of file From b0debdafd69e2959f234f269cfe52d3605c5441f Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 17:23:03 +0200 Subject: [PATCH 02/11] Make file link replacement in the docs more flexible. --- src/Paket/Commands.fs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 527abf470c..0da4cf8922 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -322,11 +322,10 @@ let markdown (command : Command) (additionalText : string) = let replaceLinks (text : string) = text - .Replace("paket.dependencies file","[`paket.dependencies` file](dependencies-file.html)") - .Replace("paket.lock file","[`paket.lock` file](lock-file.html)") - .Replace("paket.template files","[`paket.template` files](template-files.html)") - .Replace("paket.references files","[`paket.references` files](references-files.html)") - .Replace("paket.references file","[`paket.references` file](references-files.html)") + |> replace "(?<=\s)paket.dependencies( file(s)?)?" "[`paket.dependencies`$1](dependencies-file.html)" + |> replace "(?<=\s)paket.lock( file(s)?)?" "[`paket.lock`$1](lock-file.html)" + |> replace "(?<=\s)paket.template( file(s)?)?" "[`paket.template`$1](template-files.html)" + |> replace "(?<=\s)paket.references( file(s)?)?" "[`paket.references`$1](references-files.html)" let syntax, options = getSyntax command From 09d75e1e52ea15509b90edf54db54f980490272e Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 17:24:28 +0200 Subject: [PATCH 03/11] Enable usage of "# [after-command]" and "# [after-options]" in the command docs. --- src/Paket/Commands.fs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 0da4cf8922..a57ee9cb32 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -289,6 +289,16 @@ let cmdLineUsageMessage (command : Command) parser = .ToString() let markdown (command : Command) (additionalText : string) = + let (afterCommandText, afterOptionsText) = + let afterCommandIndex = additionalText.IndexOf("# [after-command]") + let afterOptionsIndex = additionalText.IndexOf("# [after-options]") + if afterCommandIndex = -1 + then "", additionalText.Replace("# [after-options]", "") + else if afterOptionsIndex = -1 + then additionalText.Replace("# [after-command]", ""), "" + else (additionalText.Substring(0, afterCommandIndex).Replace("# [after-command]", ""), + additionalText.Substring(afterOptionsIndex).Replace("# [after-options]", "")) + let replace (pattern : string) (replacement : string) input = System.Text.RegularExpressions.Regex.Replace(input, pattern, replacement) @@ -339,9 +349,11 @@ let markdown (command : Command) (additionalText : string) = .Append(" ") .AppendLine(syntax) .AppendLine() + .AppendLine(afterCommandText) + .AppendLine() .AppendLine("Options:") .AppendLine(options) - .Append(additionalText) + .Append(afterOptionsText) .ToString() |> replaceLinks From 11795b181f31c0b89aa11e3b74063086a27d0bd2 Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 18:09:57 +0200 Subject: [PATCH 04/11] Ensure consistent newlines in the generated markdown files. --- src/Paket/Commands.fs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index a57ee9cb32..af9f32de8c 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -290,14 +290,20 @@ let cmdLineUsageMessage (command : Command) parser = let markdown (command : Command) (additionalText : string) = let (afterCommandText, afterOptionsText) = + let ensureLineBreak (text : string) = if String.IsNullOrEmpty(text) + then text + else text + Environment.NewLine + Environment.NewLine + let cleanUp (text : string) = text.Replace("# [after-command]", "") + .Replace("# [after-options]", "") + .Trim('\r', '\n') |> ensureLineBreak let afterCommandIndex = additionalText.IndexOf("# [after-command]") let afterOptionsIndex = additionalText.IndexOf("# [after-options]") if afterCommandIndex = -1 - then "", additionalText.Replace("# [after-options]", "") + then "", additionalText |> cleanUp else if afterOptionsIndex = -1 - then additionalText.Replace("# [after-command]", ""), "" - else (additionalText.Substring(0, afterCommandIndex).Replace("# [after-command]", ""), - additionalText.Substring(afterOptionsIndex).Replace("# [after-options]", "")) + then additionalText |> cleanUp, "" + else (additionalText.Substring(0, afterCommandIndex) |> cleanUp, + additionalText.Substring(afterOptionsIndex) |> cleanUp) let replace (pattern : string) (replacement : string) input = System.Text.RegularExpressions.Regex.Replace(input, pattern, replacement) @@ -349,9 +355,8 @@ let markdown (command : Command) (additionalText : string) = .Append(" ") .AppendLine(syntax) .AppendLine() - .AppendLine(afterCommandText) - .AppendLine() - .AppendLine("Options:") + .Append(afterCommandText) + .Append("Options:") .AppendLine(options) .Append(afterOptionsText) .ToString() From 2e73b23b2454b20be9f38afa19278966b59119eb Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 19:19:10 +0200 Subject: [PATCH 05/11] Improve the formatting of the docs: Use a

heading for the CLI options list. --- src/Paket/Commands.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index af9f32de8c..6911077789 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -356,7 +356,7 @@ let markdown (command : Command) (additionalText : string) = .AppendLine(syntax) .AppendLine() .Append(afterCommandText) - .Append("Options:") + .Append("### Options:") .AppendLine(options) .Append(afterOptionsText) .ToString() From 4e09fb80afe78cc809092e509f34dece1e145b09 Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 22:42:13 +0200 Subject: [PATCH 06/11] Add a workaround for a bug in FSharp.Formatting. --- docs/tools/generate.fsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx index a58b6965c8..1d85866e3b 100644 --- a/docs/tools/generate.fsx +++ b/docs/tools/generate.fsx @@ -12,7 +12,9 @@ Paket.Commands.getAllCommands() if File.Exists optFile then File.ReadAllText optFile else "" - File.WriteAllText(sprintf "../content/paket-%s.md" command.Name, Paket.Commands.markdown command additionalText)) + // Work around bug tpetricek/FSharp.Formatting#321 (FSharp.Literate does not escape HTML entities in code blocks with unknown language) + let cleanText (text : string) = text.Replace("[lang=batchfile]", "[lang=msh]").Replace("```batchfile", "```msh") + File.WriteAllText(sprintf "../content/paket-%s.md" command.Name, Paket.Commands.markdown command additionalText |> cleanText)) #endif From dae506377d52943267e37a4aa218a0c836df972f Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 22:49:54 +0200 Subject: [PATCH 07/11] Update the documentation for "paket update", "paket install" and "paket restore". Fixes fsprojects/Paket#848. --- docs/content/commands/install.md | 8 +++++++ docs/content/commands/restore.md | 4 ++++ docs/content/commands/update.md | 40 ++++++++++++++++++++++++++++---- src/Paket/Commands.fs | 6 ++--- 4 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 docs/content/commands/install.md create mode 100644 docs/content/commands/restore.md diff --git a/docs/content/commands/install.md b/docs/content/commands/install.md new file mode 100644 index 0000000000..79178e8ad7 --- /dev/null +++ b/docs/content/commands/install.md @@ -0,0 +1,8 @@ +# [after-command] + +If the paket.dependencies file has been changed since the last update of the paket.lock file (e.g. added dependencies or changed version requirements), +Paket will update the paket.lock file to make it match paket.dependencies again. + +Unlike [`paket update`](paket-update.html), [`paket install`](paket-install.html) will only look for +new versions of dependencies that have been modified in paket.dependencies, +and use the version from paket.lock for all other dependencies. diff --git a/docs/content/commands/restore.md b/docs/content/commands/restore.md new file mode 100644 index 0000000000..640355dcb9 --- /dev/null +++ b/docs/content/commands/restore.md @@ -0,0 +1,4 @@ +# [after-command] + +`paket restore` fails with an error if the paket.lock file does not exist. +No packages are downloaded in that case. Please see `paket install` and `paket update` to learn how to create the paket.lock file. diff --git a/docs/content/commands/update.md b/docs/content/commands/update.md index fac161b616..dcdfd1baa9 100644 --- a/docs/content/commands/update.md +++ b/docs/content/commands/update.md @@ -1,12 +1,44 @@ +## Updating all packages + +If you do not specify a package, then all packages from paket.dependencies are updated. + + [lang=batchfile] + paket update [--force|-f] [--hard] [--redirects] [--no-install] + +First, the current [`paket.lock` file](lock-file.html) is deleted. `paket update` then recomputes the current dependency resolution, +as explained under [Package resolution algorithm](http://fsprojects.github.io/Paket/resolver.html), and writes it to paket.lock. +It then proceeds to download the packages and to install them into the projects. + +Please see [`paket install`](paket-install.html) if you want to keep the current versions from your paket.lock file. + +### Options: + + `--force [-f]`: Forces the download and reinstallation of all packages. + + `--hard`: Replaces package references within project files even if they are not yet adhering to the Paket's conventions (and hence considered manually managed). See [convert from NuGet](paket-convert-from-nuget.html). + + `--redirects`: Creates binding redirects for the NuGet packages. + + `--no-install`: Skips paket install --hard process afterward generation of [`paket.lock` file](lock-file.html). + + ## Updating a single package It's also possible to update only a single package and to keep all other dependencies fixed: [lang=batchfile] - $ paket update nuget PACKAGENAME [version VERSION] [--force] [--hard] + paket update nuget PACKAGENAME [version VERSION] [--force|-f] [--hard] [--redirects] [--no-install] + +### Options: + + `nuget `: Nuget package id + + `version `: Allows to specify version of the package. + + `--force [-f]`: Forces the download and reinstallation of all packages. -Options: + `--hard`: Replaces package references within project files even if they are not yet adhering to the Paket's conventions (and hence considered manually managed). See [convert from NuGet](paket-convert-from-nuget.html). - `--force`: Forces the download and reinstallation of all packages. + `--redirects`: Creates binding redirects for the NuGet packages. - `--hard`: Replaces package references within project files even if they are not yet adhering to to Paket's conventions (and hence considered manually managed). See [convert from NuGet](paket-convert-from-nuget.html). \ No newline at end of file + `--no-install`: Skips paket install --hard process afterward generation of [`paket.lock` file](lock-file.html). diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 6911077789..98c563c0f4 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -32,12 +32,12 @@ with | FindRefs -> "Finds all project files that have the given NuGet packages installed." | Init -> "Creates empty paket.dependencies file in the working directory." | AutoRestore -> "Enables or disables automatic Package Restore in Visual Studio during the build process." - | Install -> "Ensures that all dependencies in your paket.dependencies file are present in the `packages` directory and referenced correctly in all projects." + | Install -> "Download the dependencies specified by the paket.dependencies or paket.lock file into the `packages/` directory and update projects." | Outdated -> "Lists all dependencies that have newer versions available." | Remove -> "Removes a package from your paket.dependencies file and all paket.references files." - | Restore -> "Ensures that all dependencies in your paket.dependencies file are present in the `packages` directory." + | Restore -> "Download the dependencies specified by the paket.lock file into the `packages/` directory." | Simplify -> "Simplifies your paket.dependencies file by removing transitive dependencies." - | Update -> "Recomputes the dependency resolution, updates the paket.lock file and propagates any resulting package changes into all project files referencing updated packages." + | Update -> "Update one or all dependencies to their latest version and update projects." | FindPackages -> "EXPERIMENTAL: Allows to search for packages." | FindPackageVersions -> "EXPERIMENTAL: Allows to search for package versions." | ShowInstalledPackages -> "EXPERIMENTAL: Shows all installed top-level packages." From 0d0d43e60d02b3fb3d674ea770fadddf29516997 Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 22:52:34 +0200 Subject: [PATCH 08/11] Fix multiple small factual and grammatical errors in the command docs. --- docs/content/commands/add.md | 2 +- docs/content/commands/config.md | 12 +++++-- docs/content/commands/convert-from-nuget.md | 10 +++--- docs/content/commands/find-packages.md | 2 +- src/Paket/Commands.fs | 36 ++++++++++----------- 5 files changed, 34 insertions(+), 28 deletions(-) diff --git a/docs/content/commands/add.md b/docs/content/commands/add.md index 6a9ded322e..af21b6b3de 100644 --- a/docs/content/commands/add.md +++ b/docs/content/commands/add.md @@ -15,7 +15,7 @@ Consider the following paket.dependencies file: nuget FAKE -Now we run `paket add nuget xunit --interactive` install the package: +Now we run `paket add nuget xunit --interactive` to install the package: ![alt text](img/interactive-add.png "Interactive paket add") diff --git a/docs/content/commands/config.md b/docs/content/commands/config.md index 0ce136a6ab..47ff6ddd53 100644 --- a/docs/content/commands/config.md +++ b/docs/content/commands/config.md @@ -1,8 +1,14 @@ -Paket will then ask for username and password. +## Adding credentials -This credentials will be used if no username and password for the source are configured in the [`paket.dependencies` file](nuget-dependencies.html). +```batchfile +paket config add-credentials SOURCEURL +``` -The configuration file can be found in: +Paket will then ask you for the username and password that will be used for the specified `SOURCEURL`. + +The credentials you enter here will then be used if no username and password for the source are configured in the [`paket.dependencies` file](nuget-dependencies.html). + +The configuration file can be found at: let AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) let PaketConfigFolder = Path.Combine(AppDataFolder, "Paket") diff --git a/docs/content/commands/convert-from-nuget.md b/docs/content/commands/convert-from-nuget.md index 56fe415509..d8197be98c 100644 --- a/docs/content/commands/convert-from-nuget.md +++ b/docs/content/commands/convert-from-nuget.md @@ -19,13 +19,13 @@ The `paket convert-from-nuget` command: ## Migrating NuGet source credentials If you are using authorized NuGet feeds, convert-from-nuget command will automatically migrate the credentials for you. -Following are valid modes for `--creds-migration` option: +Following are valid modes for the `--creds-migration` option: -1. `encrypt` - Encrypt your credentials and save in [paket configuration file](paket-config-file.html). -2. `plaintext` - Include your credentials in plaintext in paket.dependencies file. See [example](nuget-dependencies.html#plaintext-credentials) -3. `selective` - Use this switch, if you're using more than one authorized NuGet feed, and want to apply different mode for each of them. +1. `encrypt` - Encrypt your credentials and save them in the [paket configuration file](paket-config-file.html). +2. `plaintext` - Include your credentials in plaintext in the paket.dependencies file. See [example](nuget-dependencies.html#plaintext-credentials). +3. `selective` - Use this switch if you're using more than one authorized NuGet feed, and you want to apply different modes for each of them. ## Simplify direct dependencies After converting your solution from NuGet, you may end up with many transitive dependencies in your Paket files. -Consider using [`paket simplify`](paket-simplify.html) to remove unnecessary transitive dependencies from your paket.dependencies file and paket.references files. \ No newline at end of file +Consider using [`paket simplify`](paket-simplify.html) to remove unnecessary transitive dependencies from your paket.dependencies and paket.references files. diff --git a/docs/content/commands/find-packages.md b/docs/content/commands/find-packages.md index d9a3acf88e..a8c39290b5 100644 --- a/docs/content/commands/find-packages.md +++ b/docs/content/commands/find-packages.md @@ -14,4 +14,4 @@ The silent mode can be used for additional tooling support in various editors. I paket find-packages -s -The command allows runs to suggest package names. It will keep in a loop until it receives the text ":q". +The command allows runs to suggest package names. It will keep running in a loop until it receives the text ":q". diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index 98c563c0f4..c56b67bd3b 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -30,7 +30,7 @@ with | Config -> "Allows to store global configuration values like NuGet credentials." | ConvertFromNuget -> "Converts from using NuGet to Paket." | FindRefs -> "Finds all project files that have the given NuGet packages installed." - | Init -> "Creates empty paket.dependencies file in the working directory." + | Init -> "Creates an empty paket.dependencies file in the working directory." | AutoRestore -> "Enables or disables automatic Package Restore in Visual Studio during the build process." | Install -> "Download the dependencies specified by the paket.dependencies or paket.lock file into the `packages/` directory and update projects." | Outdated -> "Lists all dependencies that have newer versions available." @@ -70,7 +70,7 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Nuget(_) -> "Nuget package id." + | Nuget(_) -> "NuGet package id." | Version(_) -> "Allows to specify version of the package." | Project(_) -> "Allows to add the package to a single project only." | Force -> "Forces the download and reinstallation of all packages." @@ -85,7 +85,7 @@ with interface IArgParserTemplate with member this.Usage = match this with - | AddCredentials(_) -> "Add credentials for the specified Nuget feed" + | AddCredentials(_) -> "Add credentials for the specified NuGet feed." type ConvertFromNugetArgs = | [] Force @@ -96,10 +96,10 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Force -> "Forces the conversion, even if a paket.dependencies file or paket.references files are present." + | Force -> "Forces the conversion, even if paket.dependencies or paket.references files are present." | No_Install -> "Skips paket install --hard process afterward generation of dependencies / references files." | No_Auto_Restore -> "Skips paket auto-restore process afterward generation of dependencies / references files." - | Creds_Migration(_) -> "Specify mode for migrating NuGet source credentials. Possible values are [`encrypt`|`plaintext`|`selective`]. The default mode is `encrypt`." + | Creds_Migration(_) -> "Specify a mode for migrating NuGet source credentials. Possible values are [`encrypt`|`plaintext`|`selective`]. The default mode is `encrypt`." type FindRefsArgs = | [][][] Packages of string @@ -122,8 +122,8 @@ with interface IArgParserTemplate with member this.Usage = match this with - | On -> "Turns auto restore on" - | Off -> "Turns auto restore off" + | On -> "Turns auto restore on." + | Off -> "Turns auto restore off." type InstallArgs = | [] Force @@ -160,8 +160,8 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Nuget(_) -> "Nuget package id." - | Project(_) -> "Allows to add the package to a single project only." + | Nuget(_) -> "NuGet package id." + | Project(_) -> "Allows to remove the package from a single project only." | Force -> "Forces the download and reinstallation of all packages." | Interactive -> "Asks the user for every project if he or she wants to remove the package from the projects's paket.references file. By default every installation of the package is removed." | Hard -> "Replaces package references within project files even if they are not yet adhering to the Paket's conventions (and hence considered manually managed)." @@ -198,7 +198,7 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Nuget(_) -> "Nuget package id" + | Nuget(_) -> "NuGet package id." | Version(_) -> "Allows to specify version of the package." | Force -> "Forces the download and reinstallation of all packages." | Hard -> "Replaces package references within project files even if they are not yet adhering to the Paket's conventions (and hence considered manually managed)." @@ -216,8 +216,8 @@ with match this with | SearchText(_) -> "Search text of a Package." | Source(_) -> "Allows to specify the package source feed." - | MaxResults(_) -> "Max. No. of results." - | Silent -> "Doesn't trace other output than the search result" + | MaxResults(_) -> "Maximum number of results." + | Silent -> "Doesn't trace other output than the search result." type ShowInstalledPackagesArgs = | All @@ -229,7 +229,7 @@ with match this with | All -> "Shows all installed packages (incl. transitive dependencies)." | Project(_) -> "Show only packages that are installed in the given project." - | Silent -> "Doesn't trace other output than installed packages" + | Silent -> "Doesn't trace other output than installed packages." type FindPackageVersionsArgs = | [][] Name of string @@ -240,10 +240,10 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Name(_) -> "Name of the Package" + | Name(_) -> "Name of the Package." | Source(_) -> "Allows to specify the package source feed." - | MaxResults(_) -> "Max. No. of results" - | Silent -> "Doesn't trace other output than the search result" + | MaxResults(_) -> "Maximum number of results." + | Silent -> "Doesn't trace other output than the search result." type PackArgs = | [][] Output of string @@ -270,10 +270,10 @@ with interface IArgParserTemplate with member this.Usage = match this with - | Url(_) -> "Url of the Nuget feed." + | Url(_) -> "Url of the NuGet feed." | FileName(_) -> "Path to the package." | ApiKey(_) -> "Optionally specify your API key on the command line. Otherwise uses the value of the `nugetkey` environment variable." - | EndPoint(_) -> "Optionally specify a custom api endpoint to push to. Defaults to `/api/v2/package`" + | EndPoint(_) -> "Optionally specify a custom api endpoint to push to. Defaults to `/api/v2/package`." let cmdLineSyntax (parser:UnionArgParser<_>) commandName = "$ paket " + commandName + " " + parser.PrintCommandLineSyntax() From 282f2fb4e7c75544f4d447177acfceb34d7abd0d Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 22:53:09 +0200 Subject: [PATCH 09/11] Fix whitespace inconsistencies in the command docs. --- docs/content/commands/auto-restore.md | 2 +- docs/content/commands/config.md | 2 +- .../content/commands/find-package-versions.md | 7 ++--- docs/content/commands/find-packages.md | 10 ++++--- docs/content/commands/find-refs.md | 27 ++++++++++--------- docs/content/commands/outdated.md | 2 +- docs/content/commands/remove.md | 2 +- .../commands/show-installed-packages.md | 7 ++--- docs/content/commands/simplify.md | 2 +- 9 files changed, 33 insertions(+), 28 deletions(-) diff --git a/docs/content/commands/auto-restore.md b/docs/content/commands/auto-restore.md index 471df5d554..efa202572f 100644 --- a/docs/content/commands/auto-restore.md +++ b/docs/content/commands/auto-restore.md @@ -7,4 +7,4 @@ Auto-restore on: Auto-restore off: - removes `paket.targets` from the `.paket` directory, - - removes the `` statement for `paket.targets` from projects that have the [references file](references-files.html). \ No newline at end of file + - removes the `` statement for `paket.targets` from projects that have the [references file](references-files.html). diff --git a/docs/content/commands/config.md b/docs/content/commands/config.md index 47ff6ddd53..8841335e03 100644 --- a/docs/content/commands/config.md +++ b/docs/content/commands/config.md @@ -12,4 +12,4 @@ The configuration file can be found at: let AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) let PaketConfigFolder = Path.Combine(AppDataFolder, "Paket") - let PaketConfigFile = Path.Combine(PaketConfigFolder, "paket.config") \ No newline at end of file + let PaketConfigFile = Path.Combine(PaketConfigFolder, "paket.config") diff --git a/docs/content/commands/find-package-versions.md b/docs/content/commands/find-package-versions.md index 8bbb91e734..175e0f137d 100644 --- a/docs/content/commands/find-package-versions.md +++ b/docs/content/commands/find-package-versions.md @@ -1,9 +1,10 @@ ## Sample Running the command: - - paket find-package-versions name FAKE -s max 10 + + [lang=batchfile] + paket find-package-versions name FAKE -s max 10 will result in: -![alt text](img/paket-find-package-versions.png "paket find-package-versions command") \ No newline at end of file +![alt text](img/paket-find-package-versions.png "paket find-package-versions command") diff --git a/docs/content/commands/find-packages.md b/docs/content/commands/find-packages.md index a8c39290b5..3e9d699d55 100644 --- a/docs/content/commands/find-packages.md +++ b/docs/content/commands/find-packages.md @@ -1,8 +1,9 @@ ## Sample Running the command: - - paket find-packages + + [lang=batchfile] + paket find-packages and then enter search text and press enter: @@ -11,7 +12,8 @@ and then enter search text and press enter: ## Silent mode The silent mode can be used for additional tooling support in various editors. It allows to create suggestions for `paket add`: - - paket find-packages -s + + [lang=batchfile] + paket find-packages -s The command allows runs to suggest package names. It will keep running in a loop until it receives the text ":q". diff --git a/docs/content/commands/find-refs.md b/docs/content/commands/find-refs.md index 65f25581b4..f586aa6276 100644 --- a/docs/content/commands/find-refs.md +++ b/docs/content/commands/find-refs.md @@ -2,24 +2,25 @@ *.src/Paket/paket.references* contains: - UnionArgParser - FSharp.Core + UnionArgParser + FSharp.Core *.src/Paket.Core/paket.references* contains: - Newtonsoft.Json - DotNetZip - FSharp.Core + Newtonsoft.Json + DotNetZip + FSharp.Core Now we run - - paket find-refs DotNetZip FSharp.Core + + [lang=batchfile] + paket find-refs DotNetZip FSharp.Core and paket gives the following output: - - DotNetZip - .src/Paket.Core/Paket.Core.fsproj - FSharp.Core - .src/Paket.Core/Paket.Core.fsproj - .src/Paket/Paket.fsproj \ No newline at end of file + DotNetZip + .src/Paket.Core/Paket.Core.fsproj + + FSharp.Core + .src/Paket.Core/Paket.Core.fsproj + .src/Paket/Paket.fsproj diff --git a/docs/content/commands/outdated.md b/docs/content/commands/outdated.md index f36061311f..f7b085e541 100644 --- a/docs/content/commands/outdated.md +++ b/docs/content/commands/outdated.md @@ -18,4 +18,4 @@ and the following paket.lock file: Now we run `paket outdated`: -![alt text](img/paket-outdated.png "paket outdated command") \ No newline at end of file +![alt text](img/paket-outdated.png "paket outdated command") diff --git a/docs/content/commands/remove.md b/docs/content/commands/remove.md index 34b6009666..57fc82b9d4 100644 --- a/docs/content/commands/remove.md +++ b/docs/content/commands/remove.md @@ -5,4 +5,4 @@ It's also possible to remove a package from a specified project only: [lang=batchfile] $ paket remove nuget PACKAGENAME [project PROJECT] [--force] [--hard] -See also [paket add](paket-add.html). \ No newline at end of file +See also [paket add](paket-add.html). diff --git a/docs/content/commands/show-installed-packages.md b/docs/content/commands/show-installed-packages.md index 75b15785cf..692a52e5b7 100644 --- a/docs/content/commands/show-installed-packages.md +++ b/docs/content/commands/show-installed-packages.md @@ -1,9 +1,10 @@ ## Sample Running the command: - - paket show-installed-packages --all -s + + [lang=batchfile] + paket show-installed-packages --all -s will result in: -![alt text](img/paket-show-installed-packages.png "paket show-installed-packages command") \ No newline at end of file +![alt text](img/paket-show-installed-packages.png "paket show-installed-packages command") diff --git a/docs/content/commands/simplify.md b/docs/content/commands/simplify.md index e45b2c7a30..2d927e4097 100644 --- a/docs/content/commands/simplify.md +++ b/docs/content/commands/simplify.md @@ -45,4 +45,4 @@ The simplify command will help you maintain your direct dependencies. ## Interactive mode Sometimes, you may still want to have control over some of the transitive dependencies. In this case you can use the `--interactive` flag, -which will ask you to confirm before deleting a dependency from a file. \ No newline at end of file +which will ask you to confirm before deleting a dependency from a file. From 9309eb122c14eaac4c4e926c7cc3f789843eb9cd Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 22:54:13 +0200 Subject: [PATCH 10/11] Add some CSS and JS magic to cope with overly long command flag lists in the command docs. --- docs/tools/templates/template.cshtml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml index 95eb54c2ba..9a321fab5a 100644 --- a/docs/tools/templates/template.cshtml +++ b/docs/tools/templates/template.cshtml @@ -18,6 +18,30 @@ + +
From 8d27a061204adcf02a0fdeba63a0c88f6d608f10 Mon Sep 17 00:00:00 2001 From: cr7pt0gr4ph7 Date: Sun, 21 Jun 2015 22:59:06 +0200 Subject: [PATCH 11/11] Remove the "$" prefix from the command docs. --- src/Paket/Commands.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Paket/Commands.fs b/src/Paket/Commands.fs index c56b67bd3b..5c5c7c4cda 100644 --- a/src/Paket/Commands.fs +++ b/src/Paket/Commands.fs @@ -276,7 +276,7 @@ with | EndPoint(_) -> "Optionally specify a custom api endpoint to push to. Defaults to `/api/v2/package`." let cmdLineSyntax (parser:UnionArgParser<_>) commandName = - "$ paket " + commandName + " " + parser.PrintCommandLineSyntax() + "paket " + commandName + " " + parser.PrintCommandLineSyntax() let cmdLineUsageMessage (command : Command) parser = System.Text.StringBuilder()