mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Provide type from package
This prevents packages from needing instance of checks for package class type
This commit is contained in:
@@ -24,6 +24,8 @@ class AtomPackage extends Package
|
||||
resolvedMainModulePath: false
|
||||
mainModule: null
|
||||
|
||||
getType: -> 'atom'
|
||||
|
||||
load: ->
|
||||
try
|
||||
@metadata = Package.loadMetadata(@path)
|
||||
|
||||
@@ -26,6 +26,8 @@ class TextMatePackage extends Package
|
||||
@scopedProperties = []
|
||||
@metadata = {@name}
|
||||
|
||||
getType: -> 'textmate'
|
||||
|
||||
load: ({sync}={}) ->
|
||||
@metadata = Package.loadMetadata(@path, true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user