Skip to content

Commit

Permalink
Merge pull request #3543 from ncave/build
Browse files Browse the repository at this point in the history
Move build/Build project to src/Fable.Build
  • Loading branch information
ncave authored Oct 14, 2023
2 parents 6ebb959 + 38b61c0 commit 8a20457
Show file tree
Hide file tree
Showing 36 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off

dotnet tool restore
dotnet run --project build/Build.fsproj -- %*
dotnet run --project src/Fable.Build/Fable.Build.fsproj -- %*
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -x

dotnet tool restore
dotnet run --project build/Build.fsproj -- $@
dotnet run --project src/Fable.Build/Fable.Build.fsproj -- $@
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"rollup": "rollup",
"terser": "terser",
"tslint": "tslint",
"build": "dotnet run --project build/Build.fsproj",
"publish": "dotnet run --project build/Build.fsproj publish",
"test": "dotnet run --project build/Build.fsproj test",
"build": "dotnet run --project src/Fable.Build/Fable.Build.fsproj",
"publish": "dotnet run --project src/Fable.Build/Fable.Build.fsproj publish",
"test": "dotnet run --project src/Fable.Build/Fable.Build.fsproj test",
"build-compiler-js": "dotnet fable src/fable-compiler-js/src/fable-compiler-js.fsproj -o build/fable-compiler-js/out",
"postbuild-compiler-js": "rollup build/fable-compiler-js/out/app.js --file src/fable-compiler-js/dist/app.js --format umd --name Fable",
"minify-compiler-js": "terser src/fable-compiler-js/dist/app.js -o src/fable-compiler-js/dist/app.min.js --mangle --compress",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion build/FcsRepo.fs → src/Fable.Build/FcsRepo.fs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ open Build.Utils
[<Literal>]
let FCS_REPO = "https://github.com/ncave/fsharp"

let FCS_REPO_LOCAL = Path.Resolve("../fsharp_fable")
let FCS_REPO_LOCAL = Path.Resolve("../../../fsharp_fable")

[<Literal>]
let FCS_REPO_FABLE_BRANCH = "fable"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Command with
?echoPrefix
) =
let localFableDir =
__SOURCE_DIRECTORY__ </> ".." </> "src" </> "Fable.Cli"
__SOURCE_DIRECTORY__ </> ".." </> "Fable.Cli"

let args =
CmdLine.concat [
Expand Down Expand Up @@ -45,7 +45,7 @@ type Command with
?echoPrefix
) =
let localFableDir =
__SOURCE_DIRECTORY__ </> ".." </> "src" </> "Fable.Cli"
__SOURCE_DIRECTORY__ </> ".." </> "Fable.Cli"

let argsBuilder = defaultArg argsBuilder id

Expand Down Expand Up @@ -74,7 +74,7 @@ type Command with
?echoPrefix
) =
let localFableDir =
__SOURCE_DIRECTORY__ </> ".." </> "src" </> "Fable.Cli"
__SOURCE_DIRECTORY__ </> ".." </> "Fable.Cli"

let argsBuilder =
CmdLine.empty
Expand All @@ -101,7 +101,7 @@ type Command with
?echoPrefix
) =
let localFableDir =
__SOURCE_DIRECTORY__ </> ".." </> "src" </> "Fable.Cli"
__SOURCE_DIRECTORY__ </> ".." </> "Fable.Cli"

let argsBuilder =
CmdLine.empty
Expand Down Expand Up @@ -130,7 +130,7 @@ type Command with
?echoPrefix
) =
let localFableDir =
__SOURCE_DIRECTORY__ </> ".." </> "src" </> "Fable.Cli"
__SOURCE_DIRECTORY__ </> ".." </> "Fable.Cli"

let args =
CmdLine.concat [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions build/Utils.fs → src/Fable.Build/Utils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Path =
/// Resolve a path relative to the repository root
/// </summary>
static member Resolve([<ParamArray>] segments: string array) : string =
let paths = Array.concat [ [| __SOURCE_DIRECTORY__; ".." |]; segments ]
let paths = Array.concat [ [| __SOURCE_DIRECTORY__; ".."; ".." |]; segments ]

// Use GetFullPath to clean the path
Path.GetFullPath(Path.Combine(paths))
Expand All @@ -39,7 +39,7 @@ type Cmd =
let argsBuilder = defaultArg argsBuilder id
// Use absolute path so we can invoke the command from anywhere
let localFableDir =
__SOURCE_DIRECTORY__ </> ".." </> "src" </> "Fable.Cli"
__SOURCE_DIRECTORY__ </> ".." </> "Fable.Cli"

let watchMode = defaultArg watchMode false

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8a20457

Please sign in to comment.