Skip to content

Commit d883747

Browse files
committed
fix build order; switch to npm --prefix
1 parent 9fafe91 commit d883747

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

cls/SourceControl/Git/Build.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ ClassMethod BuildUIForDevMode(devMode As %Boolean, rootDirectory As %String)
88
}
99
write !, "In developer mode, building web UI:"
1010
set webUIDirectory = ##class(%File).SubDirectoryName(rootDirectory, "git-webui")
11-
write !, "npm install"
12-
write !, $zf(-100, "/SHELL", "cd", webUIDirectory, "&&", "npm", "install")
11+
write !, "npm ci"
12+
write !, $zf(-100, "/SHELL", "npm", "ci", "--prefix", webUIDirectory)
1313
write !, "npm run build"
14-
write !, $zf(-100, "/SHELL", "cd", webUIDirectory, "&&", "npm", "run", "build")
14+
write !, $zf(-100, "/SHELL", "npm", "run", "build", "--prefix", webUIDirectory)
1515
}
1616

1717
}

git-webui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"build": "grunt"
8+
"build": "grunt release"
99
},
1010
"repository": {
1111
"type": "git",

module.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
<!-- Unit tests -->
1717
<UnitTest Name="/test" Package="UnitTest.SourceControl.Git" />
1818

19+
<!-- If building in developer mode, this will build the web UI. -->
20+
<Invoke Class="SourceControl.Git.Build" Method="BuildUIForDevMode" Phase="Compile">
21+
<Arg>#{..DeveloperMode}</Arg>
22+
<Arg>#{..Root}</Arg>
23+
</Invoke>
24+
1925
<!-- Pages for the Git menu in Studio/VSCode - moved to /isc/studio/usertemplates -->
2026
<!-- Can't call the folder git-source-control because this causes errors in CSP compliation! -->
2127
<FileCopy Name="csp/gitprojectsettings.csp" Target="${libdir}../devuser/studio/templates/gitsourcecontrol/gitprojectsettings.csp" />
@@ -27,10 +33,6 @@
2733
<Invoke Class="SourceControl.Git.Utils" Method="Localize" />
2834
<Invoke Class="SourceControl.Git.Utils" Method="ConfigureWeb" />
2935
<Invoke Class="SourceControl.Git.Utils" Method="CheckInitialization" />
30-
<Invoke Class="SourceControl.Git.Build" Method="BuildUIForDevMode">
31-
<Arg>#{..DeveloperMode}</Arg>
32-
<Arg>#{..Root}</Arg>
33-
</Invoke>
3436
</Module>
3537
</Document>
3638
</Export>

0 commit comments

Comments
 (0)