This commit is contained in:
2021-08-12 14:59:27 -06:00
parent 6fad021d90
commit 96fc58aed9
2 changed files with 21 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
{
"name": "example-kiss-vscode-config",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "LGPL-2.1-or-later",
"dependencies": {
"phaser": "3.55.2"
}
}

View File

@@ -45,8 +45,13 @@
->folder
(FileSystem.createDirectory
(joinPath activeConfigDir folder)))
// When running from unit tests, install all dependencies in the example config:
(#when test (ChildProcess.spawnSync "haxelib" ["install" "all"] (object cwd activeConfigDir)))
// install all Haxe dependencies:
(assert (= 0 .status (ChildProcess.spawnSync "haxelib" ["install" "all"] (object cwd activeConfigDir))))
// install all Node dependencies:
(when (FileSystem.exists (joinPath activeConfigDir "package.json"))
(assert (= 0 .status (if (= "Windows" (Sys.systemName))
(ChildProcess.spawnSync "cmd.exe" ["/c" "npm" "install"] (object cwd activeConfigDir))
(ChildProcess.spawnSync "npm" ["install"] (object cwd activeConfigDir))))))
// Run the haxe compiler:
(let [buildResult
(ChildProcess.spawnSync "haxe" ["build.hxml"] (object cwd activeConfigDir))]