   activate: (state) ->
     packageVersion = atom.packages.getLoadedPackage('wakatime').metadata.version
 
+    loadPackages()
+
     if not isCLIInstalled()
       installCLI(->
         console.log 'Finished installing wakatime cli.'

Website:     https://wakatime.com/
###

AdmZip = require 'adm-zip'
fs = require 'fs'
os = require 'os'
path = require 'path'
execFile = require('child_process').execFile
request = require 'request'
rimraf = require 'rimraf'
ini = require 'ini'

packageVersion = null
unloadHandler = null
lastHeartbeat = 0
lastFile = ''
apiKey = null

module.exports =
  config:

    cleanupOnUninstall()
    setupEventHandlers()
    setApiKey()

loadPackages = ->
  AdmZip = require 'adm-zip'
  fs = require 'fs'
  os = require 'os'
  path = require 'path'
  execFile = require('child_process').execFile
  request = require 'request'
  rimraf = require 'rimraf'
  ini = require 'ini'

getUserHome = ->
  process.env[if process.platform == 'win32' then 'USERPROFILE' else 'HOME'] || ''
