<commit_before>UIWatcher = require './ui-watcher'

module.exports =
  commandDisposable: null
  activate: (state) ->
    return unless atom.inDevMode() and not atom.inSpecMode()

    uiWatcher = null
    activatedDisposable = atom.packages.onDidActivateInitialPackages ->
      uiWatcher = new UIWatcher(themeManager: atom.themes)
      themes = Object.keys(uiWatcher.watchedThemes)
      packages = Object.keys(uiWatcher.watchedPackages)
      activatedDisposable.dispose()

    @commandDisposable = atom.commands.add 'atom-workspace', 'dev-live-reload:reload-all', ->
      uiWatcher.reloadAll()

  deactivate: ->
    @commandDisposable?.dispose()<commit_msg>Be defensive about uiWatcher<commit_after>UIWatcher = require './ui-watcher'

module.exports =
  commandDisposable: null
  activate: (state) ->
    return unless atom.inDevMode() and not atom.inSpecMode()

    uiWatcher = null
    activatedDisposable = atom.packages.onDidActivateInitialPackages ->
      uiWatcher = new UIWatcher(themeManager: atom.themes)
      themes = Object.keys(uiWatcher.watchedThemes)
      packages = Object.keys(uiWatcher.watchedPackages)
      activatedDisposable.dispose()

    @commandDisposable = atom.commands.add 'atom-workspace', 'dev-live-reload:reload-all', ->
      uiWatcher?.reloadAll()

  deactivate: ->
    @commandDisposable?.dispose()
{'fraction_non_alphanumeric': 0.11285500747384156, 'fraction_numerical': 0.0, 'mean_word_length': 4.033834586466165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5346713', 'n_tokens_mistral': 422, 'n_tokens_neox': 403, 'n_words': 70}