Skip to content

Commit

Permalink
fix: fix package-deps loading
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 9, 2021
1 parent a1028a2 commit e3d7741
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"prepare": "npm run build"
},
"package-deps": [
"atom-ide-markdown-service",
"busy-signal"
],
"dependencies": {
Expand Down
13 changes: 11 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ export function activate() {
// Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
signatureHelpManager = new SignatureHelpManager()
subscriptions.add(signatureHelpManager)
;(require("atom-package-deps") as typeof import("atom-package-deps"))
.install("atom-ide-signature-help", true)

installPackageDeps()
.then(() => {
signatureHelpManager.initialize()
})
.catch((e) => {
atom.notifications.addError(e)
})
}

async function installPackageDeps() {
if (!atom.packages.isPackageLoaded("busy-signal")) {
await (await import("atom-package-deps")).install("atom-ide-signature-help", true)
}
}

/** Called by Atom when deactivating an extension */
Expand Down

0 comments on commit e3d7741

Please sign in to comment.