Skip to content

Commit 6945487

Browse files
authored
Merge pull request #82 from delneg/fable-3
Tried to update to Fable 3
2 parents e7ae90d + d01761b commit 6945487

16 files changed

Lines changed: 3186 additions & 8771 deletions

.config/dotnet-tools.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"paket": {
6+
"version": "5.257.0",
7+
"commands": [
8+
"paket"
9+
]
10+
},
11+
"fable": {
12+
"version": "3.1.12",
13+
"commands": [
14+
"fable"
15+
]
16+
}
17+
}
18+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ bin/Release
22
bin/Debug
33
bin/Fable
44
bin/Fable.Splitter
5+
*.fs.js
6+
*.fs.js.map
57
*.swp
68
*.userprefs
79
**/obj

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" "watch 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)