mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Rename extension to requireExtension
This commit is contained in:
@@ -55,14 +55,15 @@ windowAdditions =
|
||||
return if $("head style[path='#{fullPath}']").length
|
||||
$('head').append "<style path='#{fullPath}'>#{content}</style>"
|
||||
|
||||
extension: (name) ->
|
||||
requireExtension: (name) ->
|
||||
extensionPath = require.resolve name
|
||||
extension = require extensionPath
|
||||
rootView.activateExtension(extension)
|
||||
extension = rootView.activateExtension require(extensionPath)
|
||||
|
||||
extensionKeymapPath = fs.join(fs.directory(extensionPath), "keymap.coffee")
|
||||
require extensionKeymapPath if fs.exists(extensionKeymapPath)
|
||||
|
||||
extension
|
||||
|
||||
reload: ->
|
||||
if rootView.getModifiedBuffers().length > 0
|
||||
message = "There are unsaved buffers, reload anyway?"
|
||||
|
||||
Reference in New Issue
Block a user