18 lines
431 B
CoffeeScript
18 lines
431 B
CoffeeScript
StatsTracker = require './stats-tracker'
|
|
|
|
module.exports =
|
|
activate: ->
|
|
@stats = new StatsTracker()
|
|
atom.workspaceView.command 'editor-stats:toggle', =>
|
|
@createView().toggle(@stats)
|
|
|
|
deactivate: ->
|
|
@editorStatsView = null
|
|
@stats = null
|
|
|
|
createView: ->
|
|
unless @editorStatsView
|
|
EditorStatsView = require './editor-stats-view'
|
|
@editorStatsView = new EditorStatsView()
|
|
@editorStatsView
|