-
Notifications
You must be signed in to change notification settings - Fork 523
Description
I know there's an example of how to use Paket inside a fsx, but I think the usage of Paket.Bootstrapper and Paket in F# scripts could be greatly improved by modifying the exposure of their API for consumption and the addition of a few more functions for ease of use.
After a minor tweak to expose the main function of the bootstrapper setting up a Fake build script intended to be run with fsi and appropriate for inclusion in a github repo was as simple as
#r "./.paket/paket.bootstrapper.exe"
Paket.Bootstrapper.Program.Main [|""|]
#r "./.paket/paket.exe"
let dependencies = Paket.Dependencies.Locate __SOURCE_DIRECTORY__
dependencies.Restore()
#r "packages/Fake/FakeLib.dll"
open FakeAdding a parsing function that takes the same strings as main does on the commandline that writes the output to console would make this easy to use by anyone already familiar with the bootstrapper.
The surface area of Paket's public API seems a bit excessive
but maybe that's not too important
Like the bootstrapper Paket.exe should expose a parsing function taking commandline args as strings and that writes its output to console.
At the same time all of the commands should be exposed in a strongly typed manner to allow more complex programmatic construction and execution of paket's functions. Maybe it'd be useful to more concretely model the domain space for the types returned by these functions?
It could also be useful to implement help message functions for the exposed scripting apis that give back intellisense-like or explanatory information about the functions based on their names since there won't be any intellisense provided by an xml file shipped with the .exe
