Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Only activate after primary package has completed activation #47

Merged
merged 3 commits into from
May 12, 2017

Conversation

notnotdrew
Copy link
Member

No description provided.

@notnotdrew notnotdrew merged commit 2923404 into master May 12, 2017
@notnotdrew notnotdrew deleted the wait-to-activate branch May 12, 2017 18:51
expansionState: activationState.directoryExpansionStates
localRoot: _path.join(atom.configDirPath, '.learn-ide')
connection:
url: "#{WS_SERVER_URL}?token=#{token}&version=#{atomHelper.learnIdeVersion()}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can write this as:

atomHelper.waitForTerminalConnection()
  .then(atomHelper.getToken)
  .then((token) ->
    nsync.configure

if you wanna avoid nesting them through anonymous functions like that

you could even then wrap the nsync.configure call:

atomHelper.waitForTerminalConnection()
  .then(atomHelper.getToken)
  .then(nsync.configureFromToken)

that function probably doesn't belong on the nsync object though since it's a specific detail on how nsync is used in this context

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants