Skip to content
This repository has been archived by the owner on Sep 29, 2018. It is now read-only.

Defer UIWatcher require until needed #31

Merged
merged 1 commit into from
Nov 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const UIWatcher = require('./ui-watcher')

module.exports = {
activate (state) {
if (!atom.inDevMode() || atom.inSpecMode()) return
Expand All @@ -18,6 +16,7 @@ module.exports = {
},

startWatching () {
const UIWatcher = require('./ui-watcher')
this.uiWatcher = new UIWatcher({themeManager: atom.themes})
this.commandDisposable = atom.commands.add('atom-workspace', 'dev-live-reload:reload-all', () => this.uiWatcher.reloadAll())
if (this.activatedDisposable) this.activatedDisposable.dispose()
Expand Down