mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Use paths when loading grammars from workers
This commit is contained in:
committed by
Corey Johnson & Kevin Sawicki
parent
3b4f07701b
commit
16ff07d319
@@ -1,5 +1,5 @@
|
||||
TextMatePackage = require 'text-mate-package'
|
||||
|
||||
module.exports =
|
||||
loadPackage: (name) ->
|
||||
callTaskMethod('packageLoaded', new TextMatePackage(name).readGrammars())
|
||||
loadPackage: (path) ->
|
||||
callTaskMethod('packageLoaded', new TextMatePackage(path).readGrammars())
|
||||
|
||||
@@ -16,10 +16,10 @@ class LoadTextMatePackagesTask extends Task
|
||||
return
|
||||
|
||||
@package = @packages.shift()
|
||||
@loadPackage(@package.name)
|
||||
@loadPackage(@package.path)
|
||||
|
||||
loadPackage: (name) ->
|
||||
@callWorkerMethod('loadPackage', name)
|
||||
loadPackage: (path) ->
|
||||
@callWorkerMethod('loadPackage', path)
|
||||
|
||||
packageLoaded: (grammars) ->
|
||||
@package.loadGrammars(grammars)
|
||||
|
||||
Reference in New Issue
Block a user