-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting to make the REPL support a thing - references #124
- Loading branch information
Showing
15 changed files
with
78 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#I @"..\..\bin" | ||
#r "Paket.Core.dll" | ||
|
||
open Paket | ||
|
||
Dependencies.Locate(__SOURCE_DIRECTORY__) | ||
|
||
Dependencies.Add "FAKE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Paket | ||
|
||
open System.IO | ||
|
||
/// Paket API which is optimized for REPL use. | ||
type Dependencies private () = | ||
/// Tries to locate the paket.dependencies file in one the given folder or a parent folder. | ||
static member Locate(path) = | ||
Settings.DependenciesFile <- Settings.findDependenciesFileInPath true (DirectoryInfo path) | ||
|
||
/// Adds the given package without version requirements to the dependencies file. | ||
static member Add(package) = Dependencies.Add(package,"") | ||
|
||
/// Adds the given package with the given version to the dependencies file. | ||
static member Add(package,version) = AddProcess.Add(package, version, false, false, false, false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Paket.Settings | ||
|
||
open System | ||
open System.IO | ||
open Paket.Logging | ||
|
||
let rec internal findDependenciesFileInPath withError (dir:DirectoryInfo) = | ||
let path = Path.Combine(dir.FullName,Constants.DependenciesFileName) | ||
if File.Exists(path) then | ||
path | ||
else | ||
let parent = dir.Parent | ||
if parent = null then | ||
if withError then | ||
failwithf "Could not find %s" Constants.DependenciesFileName | ||
else | ||
Constants.DependenciesFileName | ||
else | ||
findDependenciesFileInPath withError parent | ||
|
||
let mutable DependenciesFile = findDependenciesFileInPath false (DirectoryInfo Environment.CurrentDirectory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters