Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Content/default/Build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Target.create "Clean" (fun _ ->
run dotnet [ "fable"; "clean"; "--yes" ] clientPath // Delete *.fs.js files created by Fable
)

Target.create "RestoreClientDependencies" (fun _ -> run npm [ "ci" ] ".")
Target.create "RestoreClientDependencies" (fun _ -> run npm [ "ci" ] clientPath)

Target.create "Bundle" (fun _ ->
[
Expand Down Expand Up @@ -58,6 +58,7 @@ Target.create "Run" (fun _ ->

Target.create "RunTestsHeadless" (fun _ ->
run dotnet [ "run" ] serverTestsPath
run npm [ "install" ] clientTestsPath
run dotnet [ "fable"; "-o"; "output" ] clientTestsPath
run npx [ "mocha"; "output" ] clientTestsPath
)
Expand All @@ -82,4 +83,4 @@ let dependencies = [
]

[<EntryPoint>]
let main args = runOrDefault args
let main args = runOrDefault args
File renamed without changes.
22 changes: 21 additions & 1 deletion Content/default/tests/Client/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
{
"type": "module"
"private": true,
"type": "module",
"engines": {
"node": "~18 || ~20 || ~22",
"npm": "~9 || ~10"
},
"scripts": {},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/node": "^20.9.1",
"@vitejs/plugin-react": "^4.2.0",
"autoprefixer": "^10.4.16",
"mocha": "^10.6.0",
"postcss": "^8.4.31",
"sass": "^1.69.5",
"tailwindcss": "^3.3.5",
"vite": "^5.4.18"
}
}
File renamed without changes.
3 changes: 2 additions & 1 deletion tests/Tests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ let path = __SOURCE_DIRECTORY__ </> ".." </> "Content"

let testTemplateBuild templateType =
let dir = if templateType = Normal then path </> "default" else path </> "minimal"
let clientDir = if templateType = Normal then path </> "default/src/Client" else path </> "minimal/src/Client"
testList $"{templateType}" [

testCase "run" (fun () ->
Expand All @@ -174,7 +175,7 @@ let testTemplateBuild templateType =
if templateType = Normal then
start dotnet "run" dir
else
run npm "install" dir
run npm "install" clientDir
start dotnet "fable watch --run vite" (dir </> "src" </> "Client" )

let extraProc =
Expand Down