Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
main.coffee -> main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Wliu authored and Wliu committed Nov 4, 2017
1 parent 58a26cb commit 5345a64
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/main.coffee

This file was deleted.

17 changes: 17 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
let TimecopView = null
const ViewURI = 'atom://timecop'

module.exports = {
activate() {
atom.workspace.addOpener(filePath => {
if (filePath === ViewURI) return this.createTimecopView({uri: ViewURI})
})

atom.commands.add('atom-workspace', 'timecop:view', () => atom.workspace.open(ViewURI))
},

createTimecopView(state) {
if (TimecopView == null) TimecopView = require('./timecop-view')
return new TimecopView(state)
}
}

0 comments on commit 5345a64

Please sign in to comment.