-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFableCssModules.fs
More file actions
42 lines (36 loc) · 1.25 KB
/
FableCssModules.fs
File metadata and controls
42 lines (36 loc) · 1.25 KB
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
module EasyBuild.Tools.FableCssModules
open System.IO
open SimpleExec
open BlackFox.CommandLine
open System.Threading.Tasks
type FableCssModules =
static member runAsync
// begin-snippet: FableCssModules.runAsync
(?outFile: FileInfo, ?``internal``: bool, ?camelCase: bool, ?workingDirectory: string)
: Task
// end-snippet
=
let outFile = outFile |> Option.map _.FullName
Command.RunAsync(
"npx",
CmdLine.empty
|> CmdLine.appendRaw "fcm"
|> CmdLine.appendPrefixIfSome "--outFile" outFile
|> CmdLine.apprendFlagIfSomeTrue "--internal" ``internal``
|> CmdLine.apprendFlagIfSomeTrue "--camelCase" camelCase
|> CmdLine.toString,
?workingDirectory = workingDirectory
)
static member run
// begin-snippet: FableCssModules.run
(?outFile: FileInfo, ?``internal``: bool, ?camelCase: bool, ?workingDirectory: string)
: unit
// end-snippet
=
FableCssModules.runAsync (
?outFile = outFile,
?``internal`` = ``internal``,
?camelCase = camelCase,
?workingDirectory = workingDirectory
)
|> Task.RunSynchronously