Skip to content

Instantly share code, notes, and snippets.

@anandthakker
Created October 1, 2014 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anandthakker/8132d7238a35ec73af0c to your computer and use it in GitHub Desktop.
Save anandthakker/8132d7238a35ec73af0c to your computer and use it in GitHub Desktop.
module.exports =
class MyPackageView
atom.deserializers.add(this)
constructor: (@data) -> #property assigned
serialize: -> { deserializer: 'MyPackageView', data: @data }
@deserialize: ({data}) -> new MyPackageView(data)
console.log 'Requiring MyPackageView!'
MyPackageView = require './my-package-view'
module.exports =
view: null
activate: (state) ->
@view = new MyPackageView(state ? {hello: 'world'})
deactivate: ->
serialize: ->
{
"name": "my-package",
"main": "./my-package",
"version": "0.0.0",
"description": "A short description of your package",
"activationEvents": ["my-package:toggle"],
"repository": "https://github.com/atom/my-package",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
},
"dependencies": {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment