Skip to content

Commit f30a3a0

Browse files
committed
updated build-script
1 parent 269b862 commit f30a3a0

3 files changed

Lines changed: 13 additions & 18 deletions

File tree

build.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,7 @@ if NOT exist packages\build\fake-cli\tools\netcoreapp2.1\any\fake-cli.dll (
1818
.paket\paket.exe restore
1919
)
2020

21+
dotnet tool restore
22+
2123
dotnet "packages\build\fake-cli\tools\netcoreapp2.1\any\fake-cli.dll" build %*
2224

build.fsx

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -179,28 +179,19 @@ Target.create "NpmInstall" (fun _ ->
179179
)
180180

181181
Target.create "CompileFable" (fun _ ->
182-
let npx = "node_modules/npx/index.js" |> Path.GetFullPath
183-
184-
CreateProcess.fromRawCommand "node" [npx; "fable-splitter"; "-c"; "splitter-config.js"]
185-
|> CreateProcess.withWorkingDirectory Environment.CurrentDirectory
186-
|> CreateProcess.withStandardError StreamSpecification.Inherit
187-
|> CreateProcess.withStandardOutput StreamSpecification.Inherit
188-
|> CreateProcess.ensureExitCode
189-
|> Proc.run
182+
DotNet.exec (fun o -> o) "fable" "src/Demo/Fable/Fable.fsproj"
190183
|> ignore
184+
//CreateProcess.fromRawCommand "node" [npx; "fable-splitter"; "-c"; "splitter-config.js"]
185+
//|> CreateProcess.withWorkingDirectory Environment.CurrentDirectory
186+
//|> CreateProcess.withStandardError StreamSpecification.Inherit
187+
//|> CreateProcess.withStandardOutput StreamSpecification.Inherit
188+
//|> CreateProcess.ensureExitCode
189+
//|> Proc.run
190+
//|> ignore
191191
)
192192

193193
Target.create "WatchFable" (fun _ ->
194-
let wpds = "node_modules/webpack-dev-server/bin/webpack-dev-server.js" |> Path.GetFullPath
195-
//let proj = "src/FSharp.Data.Adaptive/FSharp.Data.Adaptive.fsproj" |> Path.GetFullPath
196-
//let old = Environment.CurrentDirectory
197-
//Environment.CurrentDirectory <- Path.GetDirectoryName proj
198-
CreateProcess.fromRawCommand "node" [wpds]
199-
|> CreateProcess.withWorkingDirectory Environment.CurrentDirectory
200-
|> CreateProcess.withStandardError StreamSpecification.Inherit
201-
|> CreateProcess.withStandardOutput StreamSpecification.Inherit
202-
|> CreateProcess.ensureExitCode
203-
|> Proc.run
194+
DotNet.exec (fun o -> o) "fable" "src/Demo/Fable -s --run webpack serve"
204195
|> ignore
205196

206197
)

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ if [ ! -f packages/build/fake-cli/tools/netcoreapp2.1/any/fake-cli.dll ]; then
1515
.paket/paket install
1616
fi
1717

18+
dotnet tool restore
19+
1820
dotnet packages/build/fake-cli/tools/netcoreapp2.1/any/fake-cli.dll build $@

0 commit comments

Comments
 (0)