progress wheel when compiling extension. Close #186
This commit is contained in:
@@ -10,11 +10,17 @@
|
|||||||
|
|
||||||
(defMacro forceUpdateFailure [error]
|
(defMacro forceUpdateFailure [error]
|
||||||
`{
|
`{
|
||||||
|
(statusBarItem.hide)
|
||||||
|
(statusBarItem.dispose)
|
||||||
(handleUpdateFailure ,error)
|
(handleUpdateFailure ,error)
|
||||||
(return)
|
(return)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(var &mut :StatusBarItem statusBarItem null)
|
||||||
(defCommand context updateExtension "Update and reinstall the Kiss-Vscode extension you are editing" "C-; C-u" []
|
(defCommand context updateExtension "Update and reinstall the Kiss-Vscode extension you are editing" "C-; C-u" []
|
||||||
|
(set statusBarItem (Vscode.window.createStatusBarItem))
|
||||||
|
(set statusBarItem.text "\$(loading~spin) Compiling extension")
|
||||||
|
(statusBarItem.show)
|
||||||
(if (= "Windows" (Sys.systemName))
|
(if (= "Windows" (Sys.systemName))
|
||||||
(trySpawnSync "cmd.exe" ["/c" "npm" "install"] (options) forceUpdateFailure)
|
(trySpawnSync "cmd.exe" ["/c" "npm" "install"] (options) forceUpdateFailure)
|
||||||
(trySpawnSync "npm" ["install"] (options) forceUpdateFailure))
|
(trySpawnSync "npm" ["install"] (options) forceUpdateFailure))
|
||||||
@@ -22,8 +28,14 @@
|
|||||||
(awaitLet [_ (executeCommand
|
(awaitLet [_ (executeCommand
|
||||||
"workbench.extensions.command.installFromVSIX"
|
"workbench.extensions.command.installFromVSIX"
|
||||||
(Uri.file (joinPath (extensionPath) (last (filter (FileSystem.readDirectory (extensionPath)) ->file (file.endsWith ".vsix"))))))]
|
(Uri.file (joinPath (extensionPath) (last (filter (FileSystem.readDirectory (extensionPath)) ->file (file.endsWith ".vsix"))))))]
|
||||||
|
|
||||||
(catch [error]
|
(catch [error]
|
||||||
(handleUpdateFailure error)))
|
(statusBarItem.hide)
|
||||||
|
(statusBarItem.dispose)
|
||||||
|
(handleUpdateFailure error))
|
||||||
|
|
||||||
|
(statusBarItem.hide)
|
||||||
|
(statusBarItem.dispose))
|
||||||
|
|
||||||
{}
|
{}
|
||||||
null)
|
null)
|
||||||
|
Reference in New Issue
Block a user