-
Notifications
You must be signed in to change notification settings - Fork 37
/
build.fsx
58 lines (50 loc) · 1.27 KB
/
build.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#r "nuget: Fable.PublishUtils, 2.4.0"
open System
open PublishUtils
run "npm install && npm test"
// ATTENTION: Packages must appear in dependency order
let packages =
[ "Blob"
"Gamepad"
"Event"
"Performance"
"Url"
"WebSocket"
"WebStorage"
"Dom"
"XMLHttpRequest"
"Svg"
"Css"
"Worker"
"Geolocation"
"Navigator"
"MediaStream"
"MediaRecorder"
"MediaQueryList"
"WebRTC"
"WebGL"
"IndexedDB"
"IntersectionObserver"
"ResizeObserver"
"EventSource"
]
let ignoreCaseEquals (str1: string) (str2: string) =
String.Equals(str1, str2, StringComparison.OrdinalIgnoreCase)
let args =
fsi.CommandLineArgs
|> Array.skip 1
|> List.ofArray
match args with
| IgnoreCase "publish"::rest ->
let target = List.tryHead rest
let srcDir = fullPath "src"
let projFiles = packages |> List.map (fun pkg ->
(srcDir </> pkg), ("Browser." + pkg + ".fsproj"))
for projDir, file in projFiles do
let publish =
match target with
| Some target -> ignoreCaseEquals file.[..(file.Length - 8)] target
| None -> true
if publish then
pushFableNuget (projDir </> file) [] doNothing
| _ -> ()